3v4l.org

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

preferences:
34.52 ms | 402 KiB | 5 Q