3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = (object) array( "foo" => 42, "" => 37, "bar" => 19, ); echo "+ object created:\n"; var_dump($o); echo "\nenum properties:\n"; foreach ($o as $p => $v) { var_dump($p); } echo "\nget_object_vars()\n"; var_dump(get_object_vars($o));
Output for git.master, git.master_jit, rfc.property-hooks
+ object created: Warning: Undefined variable $o in /in/N742H on line 8 NULL enum properties: Warning: Undefined variable $o in /in/N742H on line 10 Warning: foreach() argument must be of type array|object, null given in /in/N742H on line 10 get_object_vars() Warning: Undefined variable $o in /in/N742H on line 14 Fatal error: Uncaught TypeError: get_object_vars(): Argument #1 ($object) must be of type object, null given in /in/N742H:14 Stack trace: #0 /in/N742H(14): get_object_vars(NULL) #1 {main} thrown in /in/N742H on line 14
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:
46.72 ms | 401 KiB | 8 Q