I came across a code snippet which included $a = & $b;
but hadn\'t tested whether $b actually existed (if (isset($b))
). I wasn\'t sure how PHP
The slot has to exist for you to be able to alias another variable to it (which is really what's going on here, PHP's "references" aren't really actual things as much as each "by reference" operation is a regular operation with copying replaced by aliasing), but it doesn't have to contain a non-null value, and doesn't until you assign it one (through either of its names).