PHP Wysardry
PHP Manual

PHP documentation.



Home / PHP / Manual / ...



PHP Manual
Prev Chapter 14. References Explained Next

Spotting References

Many syntax constructs in PHP are implemented via referencing mechanisms, so everything told above about reference binding also apply to these constructs. Some constructs, like passing and returning by-reference, are mentioned above. Other constructs that use references are:

global References

When you declare variable as global $var you are in fact creating reference to a global variable. That means, this is the same as:

$var =∓ $GLOBALS["var"];

That means, for example, that unsetting $var won't unset global variable.

$this

In an object method, $this is always reference to the caller object.


Prev Manual Home Next
Unsetting References Up Features
Site Menu

Amazon.ca
Amazon.com
Amazon.co.uk



Most recently updated on 11 May, 2003

Home / PHP / Manual / ...



Please feel free to contact us with any comments or suggestions
PHP Manual
PHP Wysardry

This site is hosted by Spaceports