note 92106 added to language.references.pass
| From: | mike at f2 dot net dot au | Date: | Thu, 09 Jul 2009 07:47:35 +0000 |
| Subject: | note 92106 added to language.references.pass | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158091@lists.php.net to get a copy of this message | ||
Mehea, in PHP if you pass a variable by reference that hasn't been created, PHP will create it.
See example 1:
http://au2.php.net/manual/en/language.references.whatdo.php
So $arg as a optional parameter in:
my_func(&$arg = 22) {}
...would create a variable that references itself, when every call to my_func() is made.
----
Server IP: 117.104.162.229
Probable Submitter: 203.59.96.201 (proxied: 203.59.96.201)
----
Manual Page -- http://www.php.net/manual/en/language.references.pass.php
Edit -- https://master.php.net/note/edit/92106
Del: integrated -- https://master.php.net/note/delete/92106/integrated
Del: useless -- https://master.php.net/note/delete/92106/useless
Del: bad code -- https://master.php.net/note/delete/92106/bad+code
Del: spam -- https://master.php.net/note/delete/92106/spam
Del: non-english -- https://master.php.net/note/delete/92106/non-english
Del: in docs -- https://master.php.net/note/delete/92106/in+docs
Del: other reasons-- https://master.php.net/note/delete/92106
Reject -- https://master.php.net/note/reject/92106
Search -- https://master.php.net/manage/user-notes.php