3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $b = array(2,3,4); $a = 1; array_unshift($a, $b); echo $b;
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: array_unshift() expects parameter 1 to be array, integer given in /in/m8Tfh on line 5 Notice: Array to string conversion in /in/m8Tfh on line 6 Array
Output for hhvm-3.10.0 - 3.12.0
Warning: array_unshift() expects parameter 1 to be an array, Vector, or Set in /in/m8Tfh on line 5 Notice: Array to string conversion in /in/m8Tfh on line 6 Array
Output for 5.3.0 - 5.3.29
Warning: array_unshift() expects parameter 1 to be array, integer given in /in/m8Tfh on line 5 Array
Output for 4.3.2 - 5.2.17
Warning: array_unshift(): The first argument should be an array in /in/m8Tfh on line 5 Array
Output for 4.3.0 - 4.3.1
Warning: array_unshift() [http://www.php.net/function.array-unshift]: The first argument should be an array in /in/m8Tfh on line 5 Array