xref: /PHP-7.0/Zend/tests/array_unshift_COW.phpt (revision fd088beb)
1--TEST--
2Tests that array unshift code is correctly dealing with copy on write and splitting on reference
3--FILE--
4<?php
5	$a=array();
6	$b=1;
7	$c=&$b;
8	array_unshift ($a,$b);
9	$b=2;
10	var_dump ($a);
11?>
12--EXPECT--
13array(1) {
14  [0]=>
15  int(1)
16}
17