php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #77109 Syntax enhancement for writing Lambdas
Submitted: 2018-11-05 13:32 UTC Modified: 2018-11-05 14:56 UTC
From: tomschrot at gmail dot com Assigned:
Status: Suspended Package: Scripting Engine problem
PHP Version: 7.2.11 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tomschrot at gmail dot com
New email:
PHP Version: OS:

 

 [2018-11-05 13:32 UTC] tomschrot at gmail dot com
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 = ${...};





Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-11-05 13:34 UTC] nikic@php.net
-Package: PHP Language Specification +Package: Scripting Engine problem
 [2018-11-05 14:56 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2018-11-05 14:56 UTC] cmb@php.net
Such kind of language changes certainly require discussion on the
internals@ mailing list, and may require the RFC process[1].  Feel
free to start it; for the time being I'm suspending this ticket.

Note that a related RFC[2] has been withdrawn a while ago.

[1] <https://wiki.php.net/rfc/howto>
[2] <https://wiki.php.net/rfc/arrow_functions>
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 12:01:31 2025 UTC