Re: [PHP4BETA] default null value

From: Date: Fri, 16 Apr 1999 14:57:21 +0000
Subject: Re: [PHP4BETA] default null value
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-129@lists.php.net to get a copy of this message
Andrey Zmievski wrote: > > Another feature question. > > Often, I find myself needing to set default parameter to a function to a sort > of NULL value, so that if I don't pass that default parameter when I call it, > the variable will not be set. > > Usually, in PHP3 I did it like this: > > function foo($var=_NULL_) > { } > > And then compared it with _NULL_ each time. It'd be nice if you could say > $var=<something> so that it's not set. Having a "null" constant like Java does would be nice, especially for telling empty strings and NULL from eachother in SQL query results. - Stig -- PHP 4 Beta

« previous php.version4 (#129) next »