ID: 25631 Updated by: [EMAIL PROTECTED] Reported By: marqs10 at hotmail dot com -Status: Feedback +Status: No Feedback Bug Type: *Directory/Filesystem functions Operating System: XP PHP Version: 4.3.3 New Comment:
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2003-09-23 03:24:24] [EMAIL PROTECTED] Please provide a complete example script, which starts with <?php and ends with ?> like PHP scripts usually do.. ------------------------------------------------------------------------ [2003-09-23 03:14:51] marqs10 at hotmail dot com Description: ------------ 0 in a text file does not have a length- it returns as an empty string; however,the echo line below does echo a 0 to the screen. There is no way to differentiate between a blank string and a string containing "0". I have not tried this on unix system yet, but definately does not work on windows. Reproduce code: --------------- while(!feof($handle)) { $buffer= fgets($handle); echo "$buffer"; if(strlen($buffer!=0)) { $x=(int)($buffer); $n=(int)($buffer); Expected result: ---------------- it is a simple program that returns the word "ZERO" if a 0 is in the buffer and returns a blank line if the buffer is empty. Actual result: -------------- a blank line is returned regardless if it is a 0 or a blank line. example data file- 655221583 127334 605 0 0 100000 100045 100015015 101015120 012100120 -5000 -2147483648 13 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25631&edit=1