3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Iface1 { public function method(self $other); } class A implements Iface1 { public function method(parent $other) {} } $a = new A(); // $a->method(new I2());
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0alpha1
Output for hhvm-3.12.14 - 3.17.3
Fatal error: Uncaught Error: Declaration of A::method() must be compatible with that of Iface1::method() in /in/sXSMg:8 Stack trace: #0 {main}
Process exited with code 255.