3v4l.org

run code in 300+ PHP versions simultaneously
<?php $baz = new StdClass; $baz->{"1"} = true; $baz->{"2"} = true; var_export((array)$baz); echo "\n"; var_export(key_exists((string)'1', $baz)); echo "\n"; $foo = (array)$baz; echo $foo["1"];
Output for git.master, git.master_jit, rfc.property-hooks
array ( 1 => true, 2 => true, ) Fatal error: Uncaught TypeError: key_exists(): Argument #2 ($array) must be of type array, stdClass given in /in/pJ8IO:8 Stack trace: #0 /in/pJ8IO(8): key_exists('1', Object(stdClass)) #1 {main} thrown in /in/pJ8IO on line 8
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:
37.43 ms | 406 KiB | 5 Q