3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AbstractTestCase { protected function setUp(): void { } } class MyTestCase extends AbstractTestCase { protected function setUp() { } }
Output for 7.1.25 - 7.1.32, 7.2.0 - 7.2.23, 7.3.0 - 7.3.10
Fatal error: Declaration of MyTestCase::setUp() must be compatible with AbstractTestCase::setUp(): void in /in/1bD6H on line 15
Process exited with code 255.

preferences:
181.7 ms | 1395 KiB | 50 Q