3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base {} class Foo extends Base { public int $prop { get { global $foo; define('parent', 1); parent::foo(); $foo[] = parent::$prop::get(...); } } } $foo = [];
Output for 8.5.0 - 8.5.3
Fatal error: Cannot create Closure for parent property hook call in /in/fChDK on line 12 Stack trace: #0 {main}
Process exited with code 255.
Output for 8.4.1 - 8.4.18
Fatal error: Cannot create Closure for parent property hook call in /in/fChDK on line 12
Process exited with code 255.
Output for 8.3.0 - 8.3.30
Parse error: syntax error, unexpected token "{", expecting "," or ";" in /in/fChDK on line 6
Process exited with code 255.

preferences:
149.72 ms | 1313 KiB | 6 Q