3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { public int $a; public int $b; public int $c; public function __isset($name) { var_dump('Called for' .$name); return false; } } $x = new X; $x->a = 2; $x->b = 2; //I am deliberately not setting a value for "c" var_dump($x); var_dump(isset($x->a)); unset($x->a); var_dump($x); var_dump(isset($x->a)); // So why it's called now, since it's the same state?
Output for git.master, git.master_jit
object(X)#1 (2) { ["a"]=> int(2) ["b"]=> int(2) ["c"]=> uninitialized(int) } bool(true) object(X)#1 (1) { ["a"]=> uninitialized(int) ["b"]=> int(2) ["c"]=> uninitialized(int) } string(11) "Called fora" bool(false)

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:
51.72 ms | 749 KiB | 4 Q