note 41218 added to types.comparisons

From: Date: Fri, 02 Apr 2004 20:04:49 +0000
Subject: note 41218 added to types.comparisons
Groups: php.notes 
Request: Send a blank email to php-notes+get-67536@lists.php.net to get a copy of this message
String conversion to numbers: "The value is given by the initial portion of the string. If the string starts with valid numeric data, this will be the value used. Otherwise, the value will be 0 (zero)" (0 == "info") is false because "inf" means infinity which is not equal to zero. (0 == "iffo") is true as "iffo" does not begin with a numeric value and is therefore converted to zero. (false == "iffo") is false because here, "iffo" is compared to a bool and only empty strings are equal to false ---- Manual Page -- http://www.php.net/manual/en/types.comparisons.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41218 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41218&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41218&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67536) next »