On Tue, Nov 4, 2014 at 11:48 AM, Stas Malyshev <smalys...@sugarcrm.com> wrote:
> Hi!
>
>> But it’s rather weird for closures:
>>
>>     $foo = Foo function () {
>>     };
>
> Not much weirder than:
>
> $foo = static function () { ... }
>
> which we already have. Putting modifiers in front of the function is
> nothing foreign to PHP.

This syntax is one reason that this approach is *not* taken. While
this RFC does not propose or implement a return type of static, it
could be done in the foreseeable future. Your proposed syntax would
then be ambiguous.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to