3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = array(-3,5,1,3,2,10); function array_rev($array) { for ($i = 0; $i <= count($array)/2 - 1; $i++) { $holder = $array[$i]; $array[$i] = $array[count($array) - ($i + 1)]; echo " "; echo $array[$i]; echo " "; $array[count($array) - ($i + 1)] = $holder; echo $array[count($array) - ($i + 1)]; } } echo $x;
based on jcE8Q
Output for 5.4.0 - 7.2.6
Notice: Array to string conversion in /in/1UiI5 on line 16 Array
Output for 4.3.0 - 5.3.29
Array