3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface I extends Throwable { function getCode(): string; } class E extends Exception implements I {}
Output for 8.5.0 - 8.5.7
Fatal error: Declaration of Exception::getCode() must be compatible with I::getCode(): string in /in/6bpap on line 0 Stack trace: #0 {main}
Process exited with code 255.
Output for 8.1.34, 8.2.27 - 8.2.31, 8.3.0 - 8.3.31, 8.4.1 - 8.4.22
Fatal error: Declaration of Exception::getCode() must be compatible with I::getCode(): string in /in/6bpap on line 0
Process exited with code 255.

preferences:
54.08 ms | 764 KiB | 4 Q