3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Abs { public function __toString() { return strtolower((new \ReflectionClass($this))->getShortName()); /* Should print test, not abs :P */ } } class Test extends Abs { } $x = new Test; echo $x;

preferences:
46.14 ms | 402 KiB | 5 Q