3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Hello{ private $say; private function hey() { echo 'hey'; } public function say(Hello $obj = null, $val = null) { if (null === $obj) { return $this->say; } $obj->say = $val; $obj->hey(); } public function __toString() { return $this->say; } } $test1 = new Hello; $test2 = new Hello; $test1->say($test2, 'Hello'); echo is_a('FF', 'World', true);

preferences:
44.44 ms | 402 KiB | 5 Q