Re: [RFC] Short syntax for anonymous functions

From: Date: Tue, 19 Feb 2013 13:28:05 +0000
Subject: Re: [RFC] Short syntax for anonymous functions
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-65944@lists.php.net to get a copy of this message
2013/2/19 Marcello Duarte <mduarte@inviqa.com>: > Inspired by Sara, here is another RFC, I finally got around to draft: > > https://wiki.php.net/rfc/short-syntax-for-anonymous-function > > Please feedback, > -- > Marcello Duarte BC break detected: <?php { echo "foo\n"; return "bar"; }; echo "baz\n"; return 42; ?> The {} would probably be a closure that is not assigned to anything while the current behaviour is to print "foo" and exit while returning "bar". -1 since it only saves 10 chars ("function()") without real added value.

« previous php.internals (#65944) next »