3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Muffins { public function cacheGet(...$arguments) { var_export($arguments); } } class Fooey extends Muffins { public function cacheGet($id) { parent::cacheGet($id); } } $fooey = new Fooey(); $fooey->cacheGet('I burned');
Output for 8.0.0 - 8.0.8
Fatal error: Declaration of Fooey::cacheGet($id) must be compatible with Muffins::cacheGet(...$arguments) in /in/1h3F4 on line 9
Process exited with code 255.
Output for 7.4.0 - 7.4.21
Warning: Declaration of Fooey::cacheGet($id) should be compatible with Muffins::cacheGet(...$arguments) in /in/1h3F4 on line 9 array ( 0 => 'I burned', )
Output for 7.3.0 - 7.3.29
Warning: Declaration of Fooey::cacheGet($id) should be compatible with Muffins::cacheGet(...$arguments) in /in/1h3F4 on line 12 array ( 0 => 'I burned', )

preferences:
155.52 ms | 1331 KiB | 6 Q