Chapter 14. References Explained

Table of Contents
What References Are
What References Do
What References Are Not
Returning References
Unsetting References
Spotting References

What References Are

References in PHP are means to call same variable content with different names. They are not like C pointers, they are symbol table aliases. Note that in PHP, variable names and variable content are different, so same content can have different names. The most close analogy is Unix filenames and files - variable names are directory entries, while variable contents is the file itself. References can be thought of as hardlinking in Unix filesystem.