Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /usr/local/src/php7/php-7.0.5/Zend/tests/ |
Current File : //usr/local/src/php7/php-7.0.5/Zend/tests/closure_007.phpt |
--TEST-- Closure 007: Nested lambdas in classes --FILE-- <?php class A { private $x = 0; function getClosureGetter () { return function () { return function () { $this->x++; }; }; } function printX () { echo $this->x."\n"; } } $a = new A; $a->printX(); $getClosure = $a->getClosureGetter(); $a->printX(); $closure = $getClosure(); $a->printX(); $closure(); $a->printX(); echo "Done\n"; ?> --EXPECT-- 0 0 0 1 Done
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare