Re: fgets()/fgetss() BC break in HEAD
| From: | Antony Dovgal | Date: | Thu, 16 Nov 2006 17:04:36 +0000 |
| Subject: | Re: fgets()/fgetss() BC break in HEAD | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-26647@lists.php.net to get a copy of this message | ||
The issue is now solved, thank you.
EOD
On 11/14/2006 12:38 AM, Antony Dovgal wrote:
Hello all. I'd like to continue recent IRC discussion here, to draw more attention to this issue. At the moment functions fgets() and fgetss() are broken in HEAD, as they return <maxlen> characters instead of <maxlen - 1>, as they do in 5.2 (and I'm pretty sure this is the way they used to work since their very first appearance in PHP). So, anybody relying on fgets($fp, 10) to return 9 characters would get 10 characters instead. Yes, this behaviour is not very intuitive for those who are not familiar with fgets() in C, but it's well documented and pretty much expected. I believe this is an unreasonable BC break and I strongly believe it should be fixed. There are 0 reasons to do it (without any discussion) and it can only result in more users' confusion, even if the original purpose was the contrary.-- Wbr, Antony Dovgal