3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $maxQty = 20; $productQtyArray = range(1, $maxQty, 1); array_unshift($productQtyArray, "phoney"); unset($productQtyArray[0]); print_r($productQtyArray);
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 [7] => 7 [8] => 8 [9] => 9 [10] => 10 [11] => 11 [12] => 12 [13] => 13 [14] => 14 [15] => 15 [16] => 16 [17] => 17 [18] => 18 [19] => 19 [20] => 20 )
Output for 4.3.2 - 4.4.9
Warning: Wrong parameter count for range() in /in/PfUSP on line 4 Warning: array_unshift(): The first argument should be an array in /in/PfUSP on line 8
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for range() in /in/PfUSP on line 4 Warning: array_unshift() [http://www.php.net/function.array-unshift]: The first argument should be an array in /in/PfUSP on line 8