3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface Foo { public function render(bool $x = false); } class X implements Foo { public function render(bool $x = false) { var_dump($x); } } (new X())->render(null);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.32, 8.3.0 - 8.3.32, 8.4.1 - 8.4.23, 8.5.0 - 8.5.8
Fatal error: Uncaught TypeError: X::render(): Argument #1 ($x) must be of type bool, null given, called in /in/asm4Y on line 16 and defined in /in/asm4Y:10 Stack trace: #0 /in/asm4Y(16): X->render(NULL) #1 {main} thrown in /in/asm4Y on line 10
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught TypeError: Argument 1 passed to X::render() must be of the type bool, null given, called in /in/asm4Y on line 16 and defined in /in/asm4Y:10 Stack trace: #0 /in/asm4Y(16): X->render(NULL) #1 {main} thrown in /in/asm4Y on line 10
Process exited with code 255.

preferences:
114.65 ms | 1450 KiB | 4 Q