3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface A { public function foo(array $a); } class B implements A { public function foo($a) {} }
based on gA9XL
Output for 7.2.0 - 7.2.11
Output for 7.0.0 - 7.1.23
Fatal error: Declaration of B::foo($a) must be compatible with A::foo(array $a) in /in/jmoFf on line 4
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Declaration of B::foo() must be compatible with that of A::foo() in /in/jmoFf:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.11.1 - 3.21.3
Fatal error: Uncaught Error: Declaration of B::foo() must be compatible with that of A::foo() in /in/jmoFf:4 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.3.19 - 5.3.29, hhvm-3.10.1
Fatal error: Declaration of B::foo() must be compatible with that of A::foo() in /in/jmoFf on line 4
Process exited with code 255.
Output for 5.4.0 - 5.6.38
Fatal error: Declaration of B::foo() must be compatible with A::foo(array $a) in /in/jmoFf on line 4
Process exited with code 255.