Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26557 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3363 invoked by uid 1010); 14 Nov 2006 09:16:14 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 3348 invoked from network); 14 Nov 2006 09:16:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Nov 2006 09:16:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=antony@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=antony@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:2429] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/A7-50866-D5989554 for ; Tue, 14 Nov 2006 04:16:14 -0500 Received: (qmail 28534 invoked from network); 14 Nov 2006 09:14:44 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 14 Nov 2006 09:14:44 -0000 Message-ID: <45598955.3030604@zend.com> Date: Tue, 14 Nov 2006 12:16:05 +0300 User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: RQuadling@GoogleMail.com CC: php-dev References: <4558E5E7.5040809@zend.com> <10845a340611140024l4902ea09q600a43c5018e819c@mail.gmail.com> In-Reply-To: <10845a340611140024l4902ea09q600a43c5018e819c@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] fgets()/fgetss() BC break in HEAD From: antony@zend.com (Antony Dovgal) 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