summaryrefslogtreecommitdiff
path: root/Zend/tests/array_unshift_COW.phpt
blob: ecc42bb0f4ec4cfd1afc5a5e2c88fe46281bbf13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--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)
}