user contributed notes
| From: | Noel Darlow | Date: | Sat, 17 May 2003 02:09:00 +0000 |
| Subject: | user contributed notes | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-17752@lists.php.net to get a copy of this message | ||
Hi
I was trying to post a user contributed note tonight but couldn't find an"add note"
link. Has this been changed recently or did i just go the wrong page or something?
Thanks.
Noel
PS: the note was about function arguments - just discovered that if you call a function like this:
foo($arg1='foo', $arg2='bar');
... that you have declared the vars $arg1 and $arg2 in the global scope as well as in the function
scope. It probably sounds obvious to experienced php'ers but it could maybe catch out newbies -
might end up overwriting a global var while thinking that you were merely declaring a var in the
function scope.