3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PDO1 {}; class PdoLm extends PDO1 {}; function getPDO(): PDO1 { return new PdoLm (); } var_export(getPDO());

preferences:
45.38 ms | 407 KiB | 5 Q