3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { protected function doSomething(Reflection $a) { return true; } } class Bar extends Foo { protected function doSomething(static $b) { return true; } } $obj = new Bar;
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.9
Parse error: syntax error, unexpected token "static", expecting variable in /in/c5r5q on line 10
Process exited with code 255.
Output for 8.3.5
Fatal error: Cannot use the static modifier on a parameter in /in/c5r5q on line 10
Process exited with code 255.

preferences:
27.24 ms | 1139 KiB | 7 Q