note 98802 deleted from language.references.arent by danbrown

From: Date: Thu, 08 Jul 2010 16:26:24 +0000
Subject: note 98802 deleted from language.references.arent by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-170795@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- I understand this like that:  The reference in PHP is like creating single pointer at own variable in C/C++ and point at variable ( without pointers arithmetic and we can't get number of variable address in memory). For example <? $a = 4; $b = &$a; $c = &$b; echo "$a - $b - $c<br>"; // 3 pointers ( a , b , c) point at memory location where stored value of number is 4. $c = 5; echo "$a - $b - $c<br>"; // all variables equals 5; unset($a); $c = 6; echo "$a - $b - $c<br>"; //$a is not exist but it was only pointer ( not real part of memory) so we have to way to get value or change it ?> ---- When we want create some "pointer of pointer" in PHP i can't do that because it's impossible in PHP. We need pointer to another pointer to change the place that the pointer refers to. In your exaple you just change value of variable in function. ( no operation of pointers )

« previous php.notes (#170795) next »