![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||
Spotting ReferencesMany 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 ReferencesWhen you declare variable as global $var you are in fact creating reference to a global variable. That means, this is the same as: That means, for example, that unsetting $var won't unset global variable. $thisIn an object method, $this is always a reference to the caller object. Copyright © 1997 - 2007 by the PHP Documentation Group. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. A copy of the Open Publication License is distributed with this manual, the latest version is presently available at http://www.opencontent.org/openpub/. Please see full copyright text at http://www.php.net/manual/en/copyright.php Original version of the above documentation is available at http://www.php.net/manual/en/ |
|