note 98481 added to language.operators.comparison

From: Date: Thu, 17 Jun 2010 22:38:26 +0000
Subject: note 98481 added to language.operators.comparison
Groups: php.notes 
Request: Send a blank email to php-notes+get-170224@lists.php.net to get a copy of this message
<?php if ('0') echo 'Any not empty string is true'; else echo 'String with only one zero is false, like empty string'; ?> Second string will be printed. Tested in 5.3.2. Hovewer this works fine <?php if('0' === true) echo 'Zero in string is not false'; ?> ---- Server IP: 69.147.83.197 Probable Submitter: 178.120.34.102 ---- Manual Page -- http://www.php.net/manual/en/language.operators.comparison.php Edit -- https://master.php.net/note/edit/98481 Del: integrated -- https://master.php.net/note/delete/98481/integrated Del: useless -- https://master.php.net/note/delete/98481/useless Del: bad code -- https://master.php.net/note/delete/98481/bad+code Del: spam -- https://master.php.net/note/delete/98481/spam Del: non-english -- https://master.php.net/note/delete/98481/non-english Del: in docs -- https://master.php.net/note/delete/98481/in+docs Del: other reasons-- https://master.php.net/note/delete/98481 Reject -- https://master.php.net/note/reject/98481 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170224) next »