3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Listener { public function update(array $args, string $hook = null); } class OneListener implements Listener { public function update(array $args) { // } }
Output for 8.4.1
Deprecated: Listener::update(): Implicitly marking parameter $hook as nullable is deprecated, the explicit nullable type must be used instead in /in/Dhqvi on line 5 Fatal error: Declaration of OneListener::update(array $args) must be compatible with Listener::update(array $args, ?string $hook = null) in /in/Dhqvi on line 10
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14
Fatal error: Declaration of OneListener::update(array $args) must be compatible with Listener::update(array $args, ?string $hook = null) in /in/Dhqvi on line 10
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Fatal error: Declaration of OneListener::update(array $args) must be compatible with Listener::update(array $args, ?string $hook = NULL) in /in/Dhqvi on line 10
Process exited with code 255.
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
Fatal error: Declaration of OneListener::update(array $args) must be compatible with Listener::update(array $args, ?string $hook = NULL) in /in/Dhqvi on line 8
Process exited with code 255.

preferences:
84.08 ms | 410 KiB | 5 Q