Re: fgets()/fgetss() BC break in HEAD
| From: | Antony Dovgal | Date: | Tue, 14 Nov 2006 09:16:05 +0000 |
| Subject: | Re: fgets()/fgetss() BC break in HEAD | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-26557@lists.php.net to get a copy of this message | ||
On 11/14/2006 11:24 AM, Richard Quadling wrote:
As we are often told on this list, PHP is not C. It seems utterly ridiculous to return maxlen-1.It also might seem ridiculous to have strlen() and str_replace(), but there are good reasons to have strlen() instead of str_len().
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. In terms of KISS, 10 means 10.In terms of KISS BC means "backward compatibility". If you don't want BC - release your own PHP.
Unless PHP !== KISS therefore 10 === 9. Make the break. Deal with it. It was wrong and now it is fixed."It works this way since PHP3" means "it works right" even if there was a bug in PHP3. That's because thousands of people could rely on this behaviour (which is, I repeat, very well documented and pretty much expected). -- Wbr, Antony Dovgal