note 106208 added to language.references.pass
| From: | jocelyn dot heuze at gmail dot com | Date: | Wed, 19 Oct 2011 05:12:01 +0000 |
| Subject: | note 106208 added to language.references.pass | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183981@lists.php.net to get a copy of this message | ||
Please note that you can't pass NULL to a function by reference, unless it's as a default
value.
<?php
function foo(&$a = NULL) {
if ($a === NULL) {
echo "NULL\n";
} else {
echo "$a\n";
}
}
foo(); // "NULL"
foo(5); // "5"
foo(NULL); // Produces an error
?>
----
Server IP: 69.147.83.197
Probable Submitter: 150.101.112.15
----
Manual Page -- http://www.php.net/manual/en/language.references.pass.php
Edit -- https://master.php.net/note/edit/106208
Del: integrated -- https://master.php.net/note/delete/106208/integrated
Del: useless -- https://master.php.net/note/delete/106208/useless
Del: bad code -- https://master.php.net/note/delete/106208/bad+code
Del: spam -- https://master.php.net/note/delete/106208/spam
Del: non-english -- https://master.php.net/note/delete/106208/non-english
Del: in docs -- https://master.php.net/note/delete/106208/in+docs
Del: other reasons-- https://master.php.net/note/delete/106208
Reject -- https://master.php.net/note/reject/106208
Search -- https://master.php.net/manage/user-notes.php