3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Interface1 { public function test1 (array $arr1, array &$arr2 = []); } interface Interface2 extends Interface1 { public function test1 (array $arr1); }
based on Q1HTv
Output for 7.0.0 - 7.3.0rc3
Fatal error: Declaration of Interface2::test1(array $arr1) must be compatible with Interface1::test1(array $arr1, array &$arr2 = Array) in /in/0Q4Mo on line 7
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Declaration of Interface2::test1() must be compatible with that of Interface1::test1() in /in/0Q4Mo:7 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Declaration of Interface2::test1() must be compatible with Interface1::test1(array $arr1, array &$arr2 = Array) in /in/0Q4Mo on line 7
Process exited with code 255.