3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function run(array $a) { var_dump($a); } }; class B extends A { public function run($a) { parent::run($a); } } $a = array(1, 2, 3); $A = new B(); $A->run($a);
based on tNduW
Output for 7.2.0
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }
Output for 7.0.0 - 7.1.10
Warning: Declaration of B::run($a) should be compatible with A::run(array $a) in /in/3LRZe on line 18 array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }
Output for 5.4.11 - 5.6.28
Strict Standards: Declaration of B::run() should be compatible with A::run(array $a) in /in/3LRZe on line 18 array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }
Output for 5.3.21 - 5.3.29
Strict Standards: Declaration of B::run() should be compatible with that of A::run() in /in/3LRZe on line 18 array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }