1--TEST-- 2array_unshift() tests 3--FILE-- 4<?php 5 6$a = array(); 7$s = ""; 8var_dump(array_unshift($a, $s)); 9var_dump($a); 10var_dump(array_unshift($s, $a)); 11var_dump($a); 12var_dump(array_unshift($a, $a)); 13var_dump($a); 14 15echo "Done\n"; 16?> 17--EXPECTF-- 18int(1) 19array(1) { 20 [0]=> 21 string(0) "" 22} 23 24Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d 25NULL 26array(1) { 27 [0]=> 28 string(0) "" 29} 30int(2) 31array(2) { 32 [0]=> 33 array(1) { 34 [0]=> 35 string(0) "" 36 } 37 [1]=> 38 string(0) "" 39} 40Done 41