[PHP-BUG] Req #77109 [NEW]: Syntax enhancement for writing Lambdas
[email protected] ("tomschrot at gmail dot com") Mon, 05 Nov 2018 13:32:35 +0000
| Newsgroups | php.standards |
|---|---|
| Message-ID | <[email protected]> |
From: tomschrot at gmail dot com
Operating system: Any
PHP version: 7.2.11
Package: PHP Language Specification
Bug Type: Feature/Change Request
Bug description:Syntax enhancement for writing Lambdas
Description:
------------
Using more and more anomynous functions / lambdas I suggest to kind of
shortcut the prevous syntax. I suggest to optional replace the
"function" keyword by a shorter writing, using $, e.g.
$f = function([args]) { ... };
should be
$f = $([args]){...};
or, if there are no args at all
$f = ${...};
--
Edit bug report at https://bugs.php.net/bug.php?id=77109&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77109&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77109&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77109&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77109&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77109&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77109&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77109&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77109&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77109&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77109&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77109&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77109&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77109&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77109&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77109&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77109&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77109&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77109&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77109&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77109&r=mysqlcfg