3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __construct( final $var { set => strtolower($value); } ) {} }
Output for 8.3.0 - 8.3.17, 8.4.1 - 8.4.4
Fatal error: Cannot use the final modifier on a parameter in /in/fvOaG on line 6
Process exited with code 255.
Output for 8.2.0 - 8.2.27
Parse error: syntax error, unexpected token "final", expecting variable in /in/fvOaG on line 6
Process exited with code 255.

preferences:
158.46 ms | 997 KiB | 7 Q