3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public function run_new() {} } class B extends A { #[Override] public function run() {} }
Output for 8.5.1
Fatal error: B::run() has #[\Override] attribute, but no matching parent method exists in /in/5bkAg on line 9 Stack trace: #0 {main}
Process exited with code 255.
Output for 8.3.5
Fatal error: B::run() has #[\Override] attribute, but no matching parent method exists in /in/5bkAg on line 9
Process exited with code 255.

preferences:
15.8 ms | 1166 KiB | 5 Q