3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class A { abstract function lol(...$args); } class B extends A { function lol(bool $a, string $c) { var_dump("asddsa"); return []; } } var_dump((new B())->lol(true, "asd"));
based on SscP9
Output for 7.0.0 - 7.1.7
Fatal error: Declaration of B::lol(bool $a, string $c) must be compatible with A::lol(...$args) in /in/6LvlQ on line 12
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Declaration of B::lol() must be compatible with that of A::lol() in /in/6LvlQ:7 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Declaration of B::lol() must be compatible with A::lol(...$args) in /in/6LvlQ on line 12
Process exited with code 255.