3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PropHookParent { public $prop = 'prop' { get => 'parent'; } } class PropHookChild extends PropHookParent { public $prop = 'prop' { get => 'child'; } function test() { echo parent::$prop::get(); } } (new PropHookParent)->test();
Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
Parse error: syntax error, unexpected token "=>" in /in/Mf9Qa on line 5
Process exited with code 255.

preferences:
146.55 ms | 1435 KiB | 7 Q