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_037.phpt |
--TEST-- Closure 037: self:: and static:: within closures --FILE-- <?php class A { private $x = 0; function getClosure () { return function () { $this->x++; self::printX(); self::print42(); static::print42(); }; } function printX () { echo $this->x."\n"; } function print42() { echo "42\n"; } } class B extends A { function print42() { echo "forty two\n"; } } $a = new A; $closure = $a->getClosure(); $closure(); $b = new B; $closure = $b->getClosure(); $closure(); ?> Done. --EXPECTF-- 1 42 42 1 42 forty two Done.
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare