php-src/Zend/tests/array_append_COW.phpt

17 lines
232 B
Plaintext
Raw Normal View History

2007-07-09 21:23:37 +08:00
--TEST--
2007-08-03 21:50:20 +08:00
Tests that array manipulation code is correctly dealing with copy on write and splitting on reference
2007-07-09 21:23:37 +08:00
--FILE--
<?php
$a=array();
$b=1;
$c=&$b;
$a[]=$b;
$b=2;
var_dump ($a);
?>
--EXPECT--
array(1) {
[0]=>
int(1)
2007-08-03 21:50:20 +08:00
}