3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait AccessibleProperties { public function __isset($property) { return property_exists($this, $property); } public function __get($property) { if (property_exists($this, $property)) { return $this->$property; } } } class Foo { use AccessibleProperties; protected $a = 'Some value'; } $foo = new Foo; $foo->a; // this works: returns 'Some value' var_dump(isset($foo->a)); // this doesn't work: returns false

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
vld0.0300.00514.55
rfc.partials0.0050.01216.90

preferences:
180.31 ms | 454 KiB | 5 Q