diff options
| author | Zoe Slattery <zoe@php.net> | 2007-07-09 13:23:37 +0000 |
|---|---|---|
| committer | Zoe Slattery <zoe@php.net> | 2007-07-09 13:23:37 +0000 |
| commit | 5d0ee5b518710ff03ec96fefa1ebdba907d612b0 (patch) | |
| tree | 8ee10619fbfc7730f29fec3c0b4484327f7a717d /Zend/tests/array_unshift_COW.phpt | |
| parent | 4c22d54e231c8be879e42aa4ffe2fb7aa0fbc284 (diff) | |
| download | php-git-5d0ee5b518710ff03ec96fefa1ebdba907d612b0.tar.gz | |
array copy on write tests
Diffstat (limited to 'Zend/tests/array_unshift_COW.phpt')
| -rw-r--r-- | Zend/tests/array_unshift_COW.phpt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/array_unshift_COW.phpt b/Zend/tests/array_unshift_COW.phpt new file mode 100644 index 0000000000..7c8beba3d9 --- /dev/null +++ b/Zend/tests/array_unshift_COW.phpt @@ -0,0 +1,17 @@ +--TEST-- + Tests that array unshift code is correctly dealing with copy on write and + splitting on reference. +--FILE-- +<?php + $a=array(); + $b=1; + $c=&$b; + array_unshift ($a,$b); + $b=2; + var_dump ($a); +?> +--EXPECT-- +array(1) { + [0]=> + int(1) +}
\ No newline at end of file |
