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
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: 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 21:00:02 2025 UTC