note 44857 added to language.references.arent
| From: | salem at osu1 dot php dot net | Date: | Wed, 18 Aug 2004 10:35:19 +0000 |
| Subject: | note 44857 added to language.references.arent | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-74869@lists.php.net to get a copy of this message | ||
i don't think that references in PHP are similar to pointers in C. Because when you set a
pointer in C it always points to latest value that the pointed variable has. I mean if "a"
is pointer of "b" and you change the value of "b", "a" still points to
the value that is changed. Shortly, in C, pointer only points to the ADDRESS of variable in memory.
But in PHP, once you write $a=&$b; $a takes the current value of $b at that time and even though
you change the value of $b later, $a stays the same (unlike C).
----
Manual Page -- http://www.php.net/manual/en/language.references.arent.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44857
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44857&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44857&report=yes
Search -- http://master.php.net/manage/user-notes.php