3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types = 1); class A { function foo(object $x) {} } class B extends A { function foo($x) {} }
Output for hhvm-3.18.5 - 3.22.0, 7.2.0 - 7.2.6
Output for 7.0.0 - 7.1.20
Warning: Declaration of B::foo($x) should be compatible with A::foo(object $x) in /in/3jgot on line 11
Output for 5.6.0 - 5.6.30
Warning: Unsupported declare 'strict_types' in /in/3jgot on line 1 Strict Standards: Declaration of B::foo() should be compatible with A::foo(object $x) in /in/3jgot on line 11