note 10488 modified in functions.arguments by felipe

From: Date: Tue, 22 Jul 2008 03:03:15 +0000
Subject: note 10488 modified in functions.arguments by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142477@lists.php.net to get a copy of this message
Nice to know is this: If you call a function giving an unset variable, it will be unset in the function. Consider this: <?php function my_test ($var) { if (isset ($var)) echo ("set"); } my_test ($unused); ?> This will _not_ echo "set", regardless of the variable being passed by value or by reference. (If my newlines are messed up, sorry, this seems to be a konqueror problem) --was-- Nice to know is this: If you call a function giving an unset variable, it will be unset in the function. Consider this: function my_test ($var) { if (isset ($var)) echo ("set"); } my_test ($unused); This will _not_ echo "set", regardless of the variable being passed by value or by reference. (If my newlines are messed up, sorry, this seems to be a konqueror problem) http://php.net/manual/en/functions.arguments.php

« previous php.notes (#142477) next »