3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo{ protected const string CONFIG_LOCATION = __DIR__ . "hello"; }
Output for 8.2.0 - 8.2.34
Parse error: syntax error, unexpected identifier "CONFIG_LOCATION", expecting "=" in /in/BPfCc on line 4
Process exited with code 255.
Output for 8.3.0 - 8.3.35, 8.4.1 - 8.4.26, 8.5.0 - 8.5.11

preferences:
27.31 ms | 1159 KiB | 9 Q