3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $have_been_set = array(); public function __set($name, $val) { $this->have_been_set[$name] = TRUE; $this->{$name} = $val; } public function __isset($name) { return array_key_exists($name, $this->have_been_set); } } $t1 = new Test(); $t1->a = null; $t2 = new Test(); var_dump( isSet($t1->a), isSet($t2->a) );
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property Test::$a is deprecated in /in/jg0re on line 9 bool(false) 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:
52.36 ms | 401 KiB | 8 Q