3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __get($var_name) { return str_replace('_', ' ', $var_name); } } $foo = new Foo(); if (empty($foo->haunting_ghost)) { // language construct echo $foo->haunting_ghost; }

preferences:
58.39 ms | 402 KiB | 5 Q