- 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.
<?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();