note 89264 added to language.references

From: Date: Sat, 28 Feb 2009 19:44:16 +0000
Subject: note 89264 added to language.references
Groups: php.notes 
Request: Send a blank email to php-notes+get-151264@lists.php.net to get a copy of this message
Here is a good magazine article (PDF format) that explains the internals of PHP's reference mechanism in detail: http://derickrethans.nl/files/phparch-php-variables-article.pdf It should explain some of the odd behavior PHP sometimes seems to exhibit, as well as why you can't create "references to references" (unlike in C++), and why you should never attempt to use references to speed up passing of large strings or arrays (it will make no difference, or it will slow things down). It was written for PHP 4 but it still applies. The only difference is in how PHP 5 handles objects: passing object variables by value only copies an internal pointer to the object. Objects in PHP 5 are only ever duplicated if you explicitly use the clone keyword. ---- Server IP: 69.147.83.197 Probable Submitter: 89.100.60.13 ---- Manual Page -- http://www.php.net/manual/en/language.references.php Edit -- https://master.php.net/note/edit/89264 Del: integrated -- https://master.php.net/note/delete/89264/integrated Del: useless -- https://master.php.net/note/delete/89264/useless Del: bad code -- https://master.php.net/note/delete/89264/bad+code Del: spam -- https://master.php.net/note/delete/89264/spam Del: non-english -- https://master.php.net/note/delete/89264/non-english Del: in docs -- https://master.php.net/note/delete/89264/in+docs Del: other reasons-- https://master.php.net/note/delete/89264 Reject -- https://master.php.net/note/reject/89264 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151264) next »