3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Foo { abstract function bar(array $params = NULL); } class Moo extends Foo { public function bar(array $params){ echo count($params); } } $c = new Moo(); $c->bar(array(5));
Output for 5.4.0 - 5.4.17
Fatal error: Declaration of Moo::bar() must be compatible with Foo::bar(array $params = NULL) in /in/uiGJ5 on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Fatal error: Declaration of Moo::bar() must be compatible with that of Foo::bar() in /in/uiGJ5 on line 11
Process exited with code 255.

preferences:
197.73 ms | 1395 KiB | 53 Q