3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php interface xi { public function fetchObject ($class_name = "stdClass" , $ctor_args = NULL); } class xc extends PDOStatement implements xi { } function foo(xi $x) { } foo(new xc);
Output for 5.2.7 - 7.1.0
Output for 5.1.0 - 5.2.6
Fatal error: Declaration of PDOStatement::fetchObject() must be compatible with that of xi::fetchObject() in /in/b464p on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Class 'PDOStatement' not found in /in/b464p on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING in /in/b464p on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING in /in/b464p on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/b464p on line 2
Process exited with code 255.