php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50877 Provide javascript equivalent of arguments.callee (closures)
Submitted: 2010-01-29 06:43 UTC Modified: 2010-11-24 09:53 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:0 of 1 (0.0%)
From: giorgio dot liscio at email dot it Assigned: jani (profile)
Status: Closed Package: *General Issues
PHP Version: 5.3.1 OS: all
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: giorgio dot liscio at email dot it
New email:
PHP Version: OS:

 

 [2010-01-29 06:43 UTC] giorgio dot liscio at email dot it
Description:
------------
hi, in future i hope to can get the callee of an anonymous function... for example:

Reproduce code:
---------------
function(&$count) use (0)
{
     echo $count++;
     if($count<100)
     {func_get_callee()}($count);
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-28 21:33 UTC] dchurch at sciencelogic dot com
This can already be done.  Use the following code:

$countup = function($count) use (&$countup)
{
    echo $count++;
    if ($count<100)
        $countup($count);
};
$countup();
 [2010-11-24 09:53 UTC] jani@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: jani
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 14:00:03 2025 UTC