Doc #51208 [Opn->Csd]: fgets return values

From: Date: Wed, 20 Oct 2010 06:46:17 +0000
Subject: Doc #51208 [Opn->Csd]: fgets return values
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5277@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51208&edit=1 ID: 51208 Updated by: kalle@php.net Reported by: serphen at gmail dot com Summary: fgets return values -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: N/A PHP Version: 5.3.1 -Assigned To: +Assigned To: kalle Block user comment: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2010-10-20 08:46:09] kalle@php.net Automatic comment from SVN on behalf of kalle Revision: http://svn.php.net/viewvc/?view=revision&revision=304534 Log: Fixed bug #51208 (fgets return values) ------------------------------------------------------------------------ [2010-03-05 02:25:43] serphen at gmail dot com According to PHP documentation, fgets is supposed to return (String)NULL and only FALSE when a error happens. The behaviour in 5.3 doesn t actually match the documentation, it returns FALSE on all errors including the case there isn't any more data to read. I believe "FALSE all the time" is the implementation the core devs wanted to have and this is not a core-bug but a doc-bug. Arnaud Granal. ------------------------------------------------------------------------ [2010-03-05 02:24:52] serphen at gmail dot com Description: ------------ According to PHP documentation, fgets is supposed to return (String)NULL and only FALSE when a error happens. The behaviour in 5.3 doesn Test script: --------------- if (fgets(...) === false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51208&edit=1

« previous php.doc.bugs (#5277) next »