php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /php-7.1.11/Zend/tests/ |
files >> //php-7.1.11/Zend/tests/closure_026.phpt |
--TEST-- Closure 026: Assigning a closure object to an array in $this --FILE-- <?php class foo { public function __construct() { $a =& $this; $a->a[] = function() { return 1; }; var_dump($this); var_dump($this->a[0]()); } } $x = new foo; print "--------------\n"; foreach ($x as $b => $c) { var_dump($b, $c); var_dump($c[0]()); } ?> --EXPECTF-- object(foo)#%d (1) { ["a"]=> array(1) { [0]=> object(Closure)#%d (1) { ["this"]=> *RECURSION* } } } int(1) -------------- string(1) "a" array(1) { [0]=> object(Closure)#%d (1) { ["this"]=> object(foo)#%d (1) { ["a"]=> array(1) { [0]=> *RECURSION* } } } } int(1)y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`