- Output for 8.4.4 - 8.4.22, 8.5.0 - 8.5.7
- object(B)#1 (1) { ["foo":protected]=> string(3) "foo" }
- Output for 8.2.28 - 8.2.30, 8.3.5 - 8.3.30
- Fatal error: Uncaught Error: Cannot initialize readonly property A::$foo from scope B in /in/PDmd0:13
Stack trace:
#0 /in/PDmd0(17): B->__construct()
#1 {main}
thrown in /in/PDmd0 on line 13
Process exited with code 255. - Output for 8.1.34
- Parse error: syntax error, unexpected token "readonly", expecting "abstract" or "final" or "class" in /in/PDmd0 on line 3
Process exited with code 255.