Chapter 14. References Explained

Table of Contents
What are References
What do References
What aren't References
Returning References
Unsetting References
Spotting the Reference

What are References

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.


Hosted by Tonec Inc.