3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting( E_ALL ); $in = array(); $foo = 'f1'; $bar = 'b1'; if ( ! isset( $in[$foo][$bar] ) ) { $in[$foo][$bar] = array(); } print_r( $in ); $ob = new stdClass(); if ( ! isset( $ob->$foo->$bar ) ) { $ob->$foo->$bar = array(); } print_r( $ob );
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [f1] => Array ( [b1] => Array ( ) ) ) Fatal error: Uncaught Error: Attempt to assign property "b1" on null in /in/g4uvN:15 Stack trace: #0 {main} thrown in /in/g4uvN on line 15
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:
91.19 ms | 401 KiB | 8 Q