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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to