note 35328 deleted from functions.arguments by vincent

From: Date: Thu, 28 Aug 2003 11:05:02 +0000
Subject: note 35328 deleted from functions.arguments by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55217@lists.php.net to get a copy of this message
Note Submitter: josh@3io.com ---- Should note that '', an empty string, is not a null value. I have a function function doit($arg1,$arg2=1) { return $arg1 * $arg2; } $me = doit(234,$_COOKIE[something]); where arg2 is usually pulled from a cookie. if the cookie is not set, an empty string is passed, not a null value, resulting in the default value not being used inside the function. watch out!

« previous php.notes (#55217) next »