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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 16:01:28 2024 UTC