3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( 'out' => Array ( 'in1' => Array ( 'd1' => "data1" 'd2' => "data2" 'd3' => "data3" 'd4' => "data4" 'd5' => "data5" 'd6' => "data6" 'd7' => "data7" 'd8' => "data8" ) 'in2' => Array ( 'd9' => Array ( 'b1' => "data9" 'b2' => "data10" ) 'd10' => Array ( 'b1' => "data11" 'b2' => "data12" ) ) ) ); function recursePrint($array) { foreach($array AS $key => $value) { if(is_array($value) { echo $key . "." . recursePrint($value); } else { echo $key . "." . $value . "\n"; } } } recursePrint($array);
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected ''d2'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /in/YuSCH on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /in/YuSCH on line 9
Process exited with code 255.

preferences:
205.25 ms | 1399 KiB | 58 Q