3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); abstract class A { abstract public function __construct(array $a); } class B extends A { public function __construct(array $z, stdClass $b) {} } new B(new stdClass);
based on A5g2R
Output for 7.0.0
Fatal error: Declaration of B::__construct(array $z, stdClass $b) must be compatible with A::__construct(array $a) in /in/JGYCZ on line 15
Process exited with code 255.
Output for 5.4.10 - 5.6.16
Fatal error: Declaration of B::__construct() must be compatible with A::__construct(array $a) in /in/JGYCZ on line 15
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Catchable fatal error: Argument 1 passed to B::__construct() must be an array, object given, called in /in/JGYCZ on line 17 and defined in /in/JGYCZ on line 13
Process exited with code 255.