3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); abstract class A { abstract public function __construct(array $a, array $cv); } class B extends A { public function __construct(stdClass $b) {} } new B(new stdClass);
Output for 7.0.0
Fatal error: Declaration of B::__construct(stdClass $b) must be compatible with A::__construct(array $a, array $cv) in /in/A5g2R on line 15
Process exited with code 255.
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Fatal error: Declaration of B::__construct() must be compatible with A::__construct(array $a, array $cv) in /in/A5g2R on line 15
Process exited with code 255.

preferences:
166.19 ms | 1395 KiB | 24 Q