Even though it is slightly sloppy usage, I tend to use "points to" as equivalent to "is a reference to".
Generally speaking, if you think of a reference as an arrow drawn on a diagram, a variable which holds a reference to another is at the tail and is called
a reference to (or
a pointer to), and the item that the reference "points at" is at the head and is called the
referent. On occasion you'll hear a referent called a "target", but this is less common, and I haven't used that in my point-by-point response.
- $pest has the value 'flea'.
- alternatively contains, has, or even is - is is very sloppy semantics, but common when dealing with direct values
- $dog points to $pest, which points to 'flea'
- alternate: points to a reference to 'flea', or (more precisely) is a reference to a reference to 'flea', if we don't know or care about the name of the intermediate variable
- $bob is a reference to a reference to $pest.
- a pointer to a reference
- a pointer to a pointer
- $bob points to a reference to a reference to 'flea'
- or is a reference to a reference to a reference to'flea' (more strictly correct)
- refers to a reference to
- $pest is the referent of $dog
- 'flea' is the referent of the referent of $dog
- $dog is the referent of $bob
- $pest is the referent of the referent of $bob
- 'flea' is the value of the referent of $dog
- 'flea' is the value of the referent of the referent of $bob
- $dog and $cat are both references to $pest
- or "both point to $pest", with "both" implying identity of the two reference values
- $bob and $sue are both references to references to $pest
- or "indirect references to $pest".
- If they both pointed to the same reference to pest, I'd say either
- the phrase I just used in 12.1 - though that does not communicate that their referent is the same reference, and it implies "one or more" intervening references, not "only one"
- say they are references to a reference to $pest.
- Note the use of "a reference" to indicate that the referent is the same for both variables; implication is that the reference to $pest may or may not be exactly the same one, only that both of the references pointed to are references to $pest.
- Alternative they are "both pointers to the same reference to" $pest, making the fact that they both reference the same reference to $pest explicit, with the implication that this was a deliberate choice for them to have the same value.
It's remarkably difficult to be precise about this! I think I've covered the alternates you're likely to hear at this point, and it's taken quite a number of edits to be precise.