3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface One { function callme(string $data): void; } interface Two { function callme(int $data): void; } class C implements One, Two { /** @param mixed $_p */ public function callme($_p): void {} } function oneone(One $one): void { $one->callme("data"); } function twotwo(Two $two): void { $two->callme(42); } $c = new C; oneone($c); twotwo($c);
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.31, 8.3.0 - 8.3.31, 8.4.1 - 8.4.22, 8.5.0 - 8.5.7
Output for 7.1.25 - 7.1.32
Fatal error: Declaration of C::callme($_p): void must be compatible with One::callme(string $data): void in /in/doUaY on line 11
Process exited with code 255.

preferences:
99.35 ms | 1472 KiB | 4 Q