Re: fgets()/fgetss() BC break in HEAD

From: Date: Tue, 14 Nov 2006 14:27:45 +0000
Subject: Re: fgets()/fgetss() BC break in HEAD
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-26566@lists.php.net to get a copy of this message
On 14-Nov-06, at 3:34 AM, Stanislav Malyshev wrote:
It seems utterly ridiculous to return maxlen-1. Whilst this is sure as hell a BC, it should work "properly". If I ask for 10, I want 10. I wouldn't have asked for 10 otherwise. Having to know the "magic" to get things to work is plainly bad magic.
It always returned length-1, manual says length-1, so suddenly in version 5.2.1 it starts returning length instead. And now imagine somebody who tries to use this function in his scripts. He should start adding version checks to each invocation of this function or what? Doesn't seem very nice behavior to me.
The comparison Tony made was between <=5.X and PHP 6, I do not believe anyone is suggesting to modify the 5.2.x behavior. Ilia Alshanetsky

« previous php.internals (#26566) next »