Edit report at http://bugs.php.net/bug.php?id=52068&edit=1

 ID:               52068
 User updated by:  wdolek at gmail dot com
 Reported by:      wdolek at gmail dot com
 Summary:          more closures on script fail
-Status:           Feedback
+Status:           Closed
 Type:             Bug
 Package:          *General Issues
 Operating System: Fedora 12, 2.6.32.11-99
 PHP Version:      5.3.2

 New Comment:

I have discovered that this is problem of eAccelerator 0.9.6, not
problem of PHP!


Previous Comments:
------------------------------------------------------------------------
[2010-06-12 22:02:29] fel...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------
[2010-06-12 22:02:15] fel...@php.net

I cannot reproduce it on 5.3.3-dev.



closure 1object(Closure)#1 (1) {

  ["parameter"]=>

  array(1) {

    ["$arg1"]=>

    string(10) "<required>"

  }

}

closure 2object(Closure)#1 (0) {

}

closure 3object(Closure)#2 (0) {

}

------------------------------------------------------------------------
[2010-06-12 21:54:15] wdolek at gmail dot com

Description:
------------
I'm not able to use more closures on single script. Closures - assigned
to variable or used as anonymous are null, instead of instance of
Closure class.



Also it is really curious, sometimes it works, if there is more code
before closure creation.



Fedora 12: 2.6.32.12-115.fc12.x86_64

Test script:
---------------
// * * * * * * * * * * closure 1

echo 'closure 1';

var_dump(function($arg1) {

        return intval($arg1) * 2;

});



// * * * * * * * * * * closure 2

echo 'closure 2';

$c2 = function() {

        echo time();            

};

var_dump($c2);



// * * * * * * * * * * closure 3

echo 'closure 3';

var_dump(function() {

        return sha1(strval(rand()));

});

Expected result:
----------------
closure 1



object(Closure)[1]



closure 2



object(Closure)[2]



closure 3



object(Closure)[3]



Actual result:
--------------
closure 1



null



closure 2



null



closure 3



object(Closure)[1]




------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52068&edit=1

Reply via email to