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_042.phpt |
--TEST-- Closure 042: Binding an instance to a non-scoped non-static closures gives it a dummy scope --SKIPIF-- <?php if(!extension_loaded("reflection")) print "skip no reflection"; ?> --FILE-- <?php $c = function() { var_dump($this); }; $d = $c->bindTo(new stdClass); $d(); $rm = new ReflectionFunction($d); var_dump($rm->getClosureScopeClass()->name); //dummy sope is Closure //should have the same effect $d = $c->bindTo(new stdClass, NULL); $d(); $rm = new ReflectionFunction($d); var_dump($rm->getClosureScopeClass()->name); //dummy sope is Closure echo "Done.\n"; --EXPECTF-- object(stdClass)#%d (0) { } string(7) "Closure" object(stdClass)#%d (0) { } string(7) "Closure" Done.
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare