Re: [RFC] Attributes v2

From: Date: Tue, 10 Mar 2020 11:53:24 +0000
Subject: Re: [RFC] Attributes v2
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-108944@lists.php.net to get a copy of this message
On 10.03.2020 12:43, Mike Schinkel wrote: >>> Alternately, why not use this (which is probably the best option IMO)?: >>> >>> function foo() attributes >>> SingleArgument("Hello"), >>> Another\SingleArgument("World"), >>> \My\Attributes\FewArguments("foo", "bar") {} >>> >> >> This particular example leads to complications with how different keywords >> stack up; would the return statement come before the "attributes" keyword? > > How does the return statement affect this example? The return statement would be inside the > braces, the attributes would be before the braces. I think he meant return type declaration. That's why the question about the use clause is as well relevant. -- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net] ---------------------------------------------------- PGP: 19359DC1 # Blog: https://kolabian.wordpress.com

« previous php.internals (#108944) next »