- Output for 8.1.24 - 8.1.34, 8.2.11 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
- Initial:
object(A)#1 (0) {
["foo":"A":private]=>
uninitialized(mixed)
}
ERROR: Typed property A::$foo must not be accessed before initialization
Assign null:
object(A)#1 (1) {
["foo":"A":private]=>
NULL
}
NULL
Unset:
object(A)#1 (0) {
["foo":"A":private]=>
uninitialized(mixed)
}
ERROR: Typed property A::$foo must not be accessed before initialization
Assign value:
object(A)#1 (1) {
["foo":"A":private]=>
int(42)
}
int(42)