The String "0"

From: Date: Thu, 06 Apr 2000 22:57:32 +0000
Subject: The String "0"
Groups: php.version4 
Request: Send a blank email to php-version4+get-13259@lists.php.net to get a copy of this message
Hello, Wondering why now the string "0" equals false. Used to be you could do something like: while ($entry = readdir($dp)) { ... } but now you have to do: while (($entry = readdir($dp)) || ($entry == "0")) { ... } which I think is going to cause a lot of people a lot of headaches. Not that it's particularly hard to deal with once you figure out it's required, but it's a strange language construct. Just curious if maybe it's a bug. Ciao, Andreas

« previous php.version4 (#13259) next »