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/ext/spl/tests/ |
Current File : //usr/local/src/php7/php-7.0.5/ext/spl/tests/bug70730.phpt |
--TEST-- Bug #70730 (Incorrect ArrayObject serialization if unset is called in serialize()) --FILE-- <?php class A extends \ArrayObject { protected $foo; public function __construct() { $this->foo = 'bar'; } public function serialize() { unset($this->foo); $result = parent::serialize(); $this->foo = 'bar'; return $result; } } $a = new A(); $a->append('item1'); $a->append('item2'); $a->append('item3'); $b = new A(); $b->unserialize($a->serialize()); var_dump($b); ?> --EXPECTF-- object(A)#%d (2) { ["foo":protected]=> string(3) "bar" ["storage":"ArrayObject":private]=> array(3) { [0]=> string(5) "item1" [1]=> string(5) "item2" [2]=> string(5) "item3" } }
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare