3v4l.org

run code in 500+ PHP versions simultaneously
<?php class TestCommand { protected function execute(): void {} } class TestCommand2 extends TestCommand { protected function execute() {} }
Output for 8.3.5
Fatal error: Declaration of TestCommand2::execute() must be compatible with TestCommand::execute(): void in /in/jUV5l on line 8
Process exited with code 255.
Output for 7.1.25 - 7.1.28, 7.2.0 - 7.2.18, 7.3.0 - 7.3.5
Fatal error: Declaration of TestCommand2::execute() must be compatible with TestCommand::execute(): void in /in/jUV5l on line 9
Process exited with code 255.

preferences:
46.71 ms | 611 KiB | 3 Q