Re: empty("0")

From: Date: Tue, 30 Oct 2001 23:42:24 +0000
Subject: Re: empty("0")
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-69359@lists.php.net to get a copy of this message
On Tue, 30 Oct 2001 20:47:26 +0100 Hartmut Holzgraefe <hartmut@six.de> wrote: > sterling hughes wrote: > > > I don't know if this has been discussed yet, but while we're getting all > > crazy with breaking compat in 4.1 and/or 5.0, why not go ahead and > > finally fix empty("0") to return false, like it really should (a > > string with 0 in it, is *not* imho an empty string). > > > > -Sterling > > > > > > as there are reasons for both sides ... > > ... maybe we should have empty() and empty0() or so ? ... The empty function is ambigous. It is not is_null or isset (is_set as usual ? ;), and I don't use it anymore. IMO 0 is not an empty content. An empty content will be an array without any cells (string is an array b.e.). The problem should appear when people don't take care about variable types, php is very flexible, this fact masks sometimes basic rules. pa

« previous php.dev (#69359) next »