References

suggest change

Syntax

Remarks

While assigning two variables by reference, both variables point to the same value. Take the following example:

$foo = 1;
$bar = &$foo;

$foo does not point to $bar. $foo and $bar both point to the same value of $foo, which is 1. To illustrate:

$baz = &$bar;
unset($bar);
$baz++;

If we had a points to relationship, this would be broken now after the unset(); instead, $foo and $baz still point to the same value, which is 2.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents