3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __get($key) { echo 'wut'; } } class Bar { public function __construct() { $this->wut = 'bar'; } public function __get($key) { echo $key; } } class Baz { public function __construct() { $this->wut = 'baz'; } } $foo = new Foo; $bar = new Bar; $baz = new Baz; var_dump([$foo->wut, $bar->wut, $baz->wut]);

preferences:
46.1 ms | 402 KiB | 5 Q