#25851 [Opn->Bgs]: empty string evaluation

From: Date: Mon, 13 Oct 2003 15:34:10 +0000
Subject: #25851 [Opn->Bgs]: empty string evaluation
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-48925@lists.php.net to get a copy of this message
ID: 25851 Updated by: sniper@php.net Reported By: fabio dot sutto at libero dot it -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Win PHP Version: 4.3.3 New Comment: It works just fine, you're just doing something wrong. Previous Comments: ------------------------------------------------------------------------ [2003-10-13 10:07:08] tony2001 at phpclub dot net Have you tried this code: <?php $line = ' '; var_dump($line === false); ?> ? I can't reproduce it under PHP5-CVS & PHP4-CVS. ------------------------------------------------------------------------ [2003-10-13 08:56:07] fabio dot sutto at libero dot it Description: ------------ Comparison operator "===" doesn't work as it should while (!feof ($this->link)) { $line = fgets($this->link, 4096) ; var_dump($line) ; //output string(1) " " /* '' is identical to false inside if */ if($line === false){ var_dump($line) ; //output bool(false) } }//end while ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25851&edit=1

« previous php.bugs (#48925) next »