- Output for 8.1.24 - 8.1.33, 8.2.11 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
- 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)