note 98801 added to language.references.arent

From: Date: Thu, 08 Jul 2010 16:25:12 +0000
Subject: note 98801 added to language.references.arent
Groups: php.notes 
Request: Send a blank email to php-notes+get-170794@lists.php.net to get a copy of this message
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 ) ---- Server IP: 69.147.83.197 Probable Submitter: 89.75.35.17 ---- Manual Page -- http://www.php.net/manual/en/language.references.arent.php Edit -- https://master.php.net/note/edit/98801 Del: integrated -- https://master.php.net/note/delete/98801/integrated Del: useless -- https://master.php.net/note/delete/98801/useless Del: bad code -- https://master.php.net/note/delete/98801/bad+code Del: spam -- https://master.php.net/note/delete/98801/spam Del: non-english -- https://master.php.net/note/delete/98801/non-english Del: in docs -- https://master.php.net/note/delete/98801/in+docs Del: other reasons-- https://master.php.net/note/delete/98801 Reject -- https://master.php.net/note/reject/98801 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170794) next »