mirror of
https://github.com/php/php-src.git
synced 2024-10-17 14:32:37 +00:00
22 lines
285 B
Plaintext
22 lines
285 B
Plaintext
|
--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)
|
||
|
}
|
||
|
--EXPECT--
|
||
|
array(1) {
|
||
|
[0]=>
|
||
|
int(1)
|
||
|
}
|