Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://oit.cmc.msu.ru/php/language.references.arent.html
Дата изменения: Sun Feb 3 22:33:41 2002 Дата индексирования: Mon Oct 1 22:07:09 2012 Кодировка: |
As said before, references aren't pointers. That means, the following construct won't do what you expect:
What happens is that $var in foo will be bound with $bar in caller, but then it will be re-bound with $GLOBALS["baz"]. There's no way to bind $bar in the calling scope to something else using the reference mechanism, since $bar is not available in the function foo (it is represented by $var, but $var has only variable contents and not name-to-value binding in the calling symbol table).