3v4l.org

run code in 300+ 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.22, 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.

preferences:
180.32 ms | 1008 KiB | 7 Q