note 47869 added to function.empty

From: Date: Fri, 03 Dec 2004 14:33:33 +0000
Subject: note 47869 added to function.empty
Groups: php.notes 
Request: Send a blank email to php-notes+get-81313@lists.php.net to get a copy of this message
This is one of the annoying things in PHP. Since when is "0" an empty string??? It is a string of legth 1, with the 0 character. This bad convention is very annoying. If you have a drop down list with an item with value zero, and that you filter out the empty submitted values, the value of the dropdown will be filtered out! I guess the sae applies when you enter 0 in a text field. Very bad behaviour in my opinion. ---- Manual Page -- http://www.php.net/manual/en/function.empty.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47869 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47869&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47869&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47869&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47869&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47869&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47869&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47869&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#81313) next »