3v4l.org

run code in 200+ php & hhvm versions
<?php abstract class A { abstract public function bar(\stdClass $x); } abstract class B extends A { abstract public function bar(\stdClass $x); }
based on pkEfr
Output for 7.2.0 - 7.3.6
Output for 5.3.0 - 5.6.40, 7.0.0 - 7.1.30
Fatal error: Can't inherit abstract function A::bar() (previously declared abstract in B) in /in/hCYKo on line 11
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Cannot re-declare abstract method A::bar() abstract in class B in /in/hCYKo:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.11.1 - 3.21.3
Fatal error: Uncaught Error: Cannot re-declare abstract method A::bar() abstract in class B in /in/hCYKo:8 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Fatal error: Cannot re-declare abstract method A::bar() abstract in class B in /in/hCYKo on line 8
Process exited with code 255.
Output for 5.0.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/hCYKo on line 5 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/hCYKo on line 10 Fatal error: Can't inherit abstract function A::bar() (previously declared abstract in B) in /in/hCYKo on line 11
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_CLASS in /in/hCYKo on line 3
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_CLASS in /in/hCYKo on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/hCYKo on line 3
Process exited with code 255.