3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $samp => Array ( ["0"] => 1 ["0_1"] => 2 ["0_2"] => 3 ["2"] => 7 ["2_1"] => 8 ["3"] => 9 ["3_1"] => 10 ); $samp2 = $samp; $i=0; $j=0; $samp = array(); foreach($samp2 as $values) { if($j != 0) $samp2[$i."_".$j] = $values; else $samp2[$i] = $values; if($j > 2) { $i++; $j=0; } } print_r($samp);
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /in/6RpW5 on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_DOUBLE_ARROW in /in/6RpW5 on line 3
Process exited with code 255.