3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = get_object_vars(json_decode('{"2":1}')); $y = (object)$x; $exprs = ['isset($x[2])', 'isset($x["2"])', 'isset($y->{2})', 'isset($y->{"2"})', '$x', '$y']; var_dump(array_map(function ($expr) use ($x, $y) { return eval("return $expr;"); }, array_combine($exprs, $exprs)));
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { ["isset($x[2])"]=> bool(true) ["isset($x["2"])"]=> bool(true) ["isset($y->{2})"]=> bool(true) ["isset($y->{"2"})"]=> bool(true) ["$x"]=> array(1) { [2]=> int(1) } ["$y"]=> object(stdClass)#1 (1) { ["2"]=> int(1) } }

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:
60.06 ms | 402 KiB | 8 Q