3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public string $foo; } class B extends A { #[Override] public string $foo; }
Output for 8.5.0 - 8.5.9, 8.2.30
Output for 8.3.0 - 8.3.37, 8.4.1 - 8.4.8
Fatal error: Attribute "Override" cannot target property (allowed targets: method) in /in/om5mJ on line 9
Process exited with code 255.

preferences:
13.68 ms | 1169 KiB | 5 Q