3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); // show all possible errors $obj = new stdclass(); $arr = array(); var_dump($arr['foo']); // Notice: Undefined index var_dump($arr[$obj]); // Warning: Illegal offset type $arr = null; var_dump($arr['foo']); // No error var_dump($arr[$obj]); // No error $arr = null; $arr['i'] = $arr['i'] + 1; // No error $arr = null; $arr['i']++; // Notice: Undefined index
Output for git.master, git.master_jit
Warning: Undefined array key "foo" in /in/69tSS on line 8 NULL Fatal error: Uncaught TypeError: Illegal offset type in /in/69tSS:9 Stack trace: #0 {main} thrown in /in/69tSS on line 9
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined array key "foo" in /in/69tSS on line 8 NULL Fatal error: Uncaught TypeError: Cannot access offset of type object on array in /in/69tSS:9 Stack trace: #0 {main} thrown in /in/69tSS on line 9
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:
40.49 ms | 401 KiB | 8 Q