<?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);
Fatal error: Declaration of PDOStatement::fetchObject(?string $class = "stdClass", array $constructorArgs = []): object|false must be compatible with xi::fetchObject($class_name = 'stdClass', $ctor_args = null) in /in/b464p on line 0
Process exited with code 255.
Output for 8.0.7 - 8.0.30
Fatal error: Declaration of PDOStatement::fetchObject(?string $class = "stdClass", array $constructorArgs = []) must be compatible with xi::fetchObject($class_name = 'stdClass', $ctor_args = null) in /in/b464p on line 0
Process exited with code 255.
Output for 8.0.0 - 8.0.6
Fatal error: Declaration of PDOStatement::fetchObject(?string $class = "stdClass", ?array $ctorArgs = null) must be compatible with xi::fetchObject($class_name = 'stdClass', $ctor_args = null) in /in/b464p on line 0
Process exited with code 255.
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.