3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_rows = array(); for($i = 1; $i <= 28; $i++) { if(in_array($i, array(1,2))) { $_rows['row1'][] = 'Category '.$i; } if(in_array($i, array(3,4,5))) { $_rows['row2'][] = 'Category '.$i; } if(in_array($i, array(6,7,8))) { $_rows['row3'][] = 'Category '.$i; } if(in_array($i, array(9,10,11))) { $_rows['row4'][] = 'Category '.$i; } if(in_array($i, array(12,13))) { $_rows['row5'][] = 'Category '.$i; } if(in_array($i, array(14,15,16))) { $_rows['row6'][] = 'Category '.$i; } if(in_array($i, array(17,18,19))) { $_rows'row7'][] = 'Category '.$i; } if(in_array($i, array(20,21,22))) { $_rows['row8'][] = 'Category '.$i; } if(in_array($i, array(23,24,25))) { $_rows['row9'][] = 'Category '.$i; } if(in_array($i, array(26,27,28))) { $_rows['row10'][] = 'Category '.$i; } } foreach($_rows as $_row) { print_r($_row); }
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected ''row7'' (T_CONSTANT_ENCAPSED_STRING) in /in/bcHH1 on line 31
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/bcHH1 on line 31
Process exited with code 255.