3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class MyPDO extends PDO { function __construct() {} } $pdo = new MyPDO(); //$pdo2 = clone $pdo; $pdo->query("123");
Output for 5.1.0 - 7.1.0
Warning: PDO::query(): SQLSTATE[00000]: No error: PDO constructor was not called in /in/FmDXu on line 5
Output for 5.0.0 - 5.0.5
Fatal error: Class 'PDO' not found in /in/FmDXu on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Class mypdo: Cannot inherit from undefined class pdo in /in/FmDXu on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Class mypdo: Cannot inherit from undefined class pdo in /in/FmDXu on line 2