3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public const FOO = 42; } var_dump( Foo::FOO[] );
Output for 8.5.0
Fatal error: Cannot use [] for reading in /in/3oV3D on line 7 Stack trace: #0 {main}
Process exited with code 255.
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.15
Fatal error: Cannot use [] for reading in /in/3oV3D on line 7
Process exited with code 255.

preferences:
194.53 ms | 1082 KiB | 8 Q