3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $configOptions = array( '1:'=>'1l:', '2:'=>'2l:' '3:'=>'3l:' '4:'=>'4l:' '5:'=>'5l:' '6:'=>'6l:' '7:'=>'7l:' '8:'=>'8l:' '9:'=>'9l:' '10:'=>'10l:' '11:'=>'11l:' '12:'=>'12l:' '13:'=>'13l:' '14:'=>'14l:' ); $out = str_replace(':', '', $configOptions); foreach($out as $key=>$value){ $newKey = str_replace(':', '', $key); $newOut[$newKey] = $value; } var_fump($newOut);
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected ''3:'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /in/oNBXA on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /in/oNBXA on line 6
Process exited with code 255.