3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct( public final $prop { get {} set {} } ) {} } class B extends A { public $prop { get {} set {} } }
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/SYBhr on line 5
Process exited with code 255.
Output for 8.2.0 - 8.2.27
Parse error: syntax error, unexpected token "final", expecting variable in /in/SYBhr on line 5
Process exited with code 255.

preferences:
159.63 ms | 997 KiB | 7 Q