3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class myClass{} class ChildClass extends ParentClass { function myFunction($param1, myClass $deprecated = null) { } } class ParentClass { function myFunction($param1, $param2 = null) { } } $obj = new ChildClass;
Output for 7.1.0
Warning: Declaration of ChildClass::myFunction($param1, ?myClass $deprecated = NULL) should be compatible with ParentClass::myFunction($param1, $param2 = NULL) in /in/PascG on line 5
Output for 7.0.0 - 7.0.14
Warning: Declaration of ChildClass::myFunction($param1, myClass $deprecated = NULL) should be compatible with ParentClass::myFunction($param1, $param2 = NULL) in /in/PascG on line 5
Output for hhvm-3.10.0 - 3.12.0
Output for 5.4.0 - 5.6.28
Strict Standards: Declaration of ChildClass::myFunction() should be compatible with ParentClass::myFunction($param1, $param2 = NULL) in /in/PascG on line 6
Output for 5.3.0 - 5.3.29
Strict Standards: Declaration of ChildClass::myFunction() should be compatible with that of ParentClass::myFunction() in /in/PascG on line 6
Output for 5.0.0 - 5.2.17
Strict Standards: Declaration of ChildClass::myFunction() should be compatible with that of ParentClass::myFunction() in /in/PascG on line 5
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting '&' or T_VARIABLE or T_CONST in /in/PascG on line 7
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, expecting '&' or T_VARIABLE or T_CONST in /in/PascG on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'&'' or `T_VARIABLE' or `T_CONST' in /in/PascG on line 7
Process exited with code 255.