3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "mama"; $array = array ( 1 => "a", 2 => "b", 3=> "c", ); $andra = array( 1=>12, 3=>14); $andra[]=56; $nr=count($array); for($i=1;$i<$nr;$i++){ echo "eu si tu : {$array[$i]}\n"; } var_dump($array); class eu { function do_eu(){ echo " eu eu eu \n"; } } $nou = new eu; $nou ->do_eu(); print (new eu0->a ; function a( $array ){ foreach( $array as $key => $value ){ if( is_array( $value ) ) $array[ $key ] = a( $value ); } return (object) $array; } function bebe( $andra ) { foreach( $andra as $key => $value) { if(is_array($value) ) $array[$key]= bebe($value); } return(object) $array; } ?>
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/PriSX on line 32
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/PriSX on line 32
Process exited with code 255.

preferences:
183.28 ms | 1395 KiB | 63 Q