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());
Output for 7.4.0 - 7.4.30, 8.0.1 - 8.0.22, 8.1.0 - 8.1.9
PdoLm::__set_state(array( ))

preferences:
16.67 ms | 409 KiB | 5 Q