I’m working on a tree structure in PHP. When looping through the nodes, an exception is sometime thrown because some node that should not be null is null, more precisely it’s set to “&NULL”:
array(13) {
// ...
// some data...
// ...
["segments"]=>
NULL
["leaf"]=>
bool(false)
["children"]=>
&NULL
}
Since it’s not inside quotes, I assume it’s some kind of special value, but what does it mean?
It just means that it is a reference to a value
NULLIf you change
$n = null;to$n = 1;– then you’ll get&int(1)