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(); echo nou; 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 git.master, git.master_jit, rfc.property-hooks
mamaeu si tu : a eu si tu : b array(3) { [1]=> string(1) "a" [2]=> string(1) "b" [3]=> string(1) "c" } eu eu eu Fatal error: Uncaught Error: Undefined constant "nou" in /in/LFrUK:32 Stack trace: #0 {main} thrown in /in/LFrUK on line 32
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
39.75 ms | 401 KiB | 8 Q