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/arrayObject_exchangeArray_basic1.phpt |
--TEST-- SPL: ArrayObject::exchangeArray() and copy-on-write references --FILE-- <?php $ao = new ArrayObject(); $swapIn = array(); $cowRef = $swapIn; // create a copy-on-write ref to $swapIn $ao->exchangeArray($swapIn); $ao['a'] = 'adding element to $ao'; $swapIn['b'] = 'adding element to $swapIn'; $ao['c'] = 'adding another element to $ao'; echo "\n--> swapIn: "; var_dump($swapIn); echo "\n--> cowRef: "; var_dump($cowRef); echo "\n--> ao: "; var_dump($ao); ?> --EXPECTF-- --> swapIn: array(1) { ["b"]=> string(25) "adding element to $swapIn" } --> cowRef: array(0) { } --> ao: object(ArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(2) { ["a"]=> string(21) "adding element to $ao" ["c"]=> string(29) "adding another element to $ao" } }
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare