Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26553 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91574 invoked by uid 1010); 14 Nov 2006 08:41:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 91559 invoked from network); 14 Nov 2006 08:41:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Nov 2006 08:41:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=good Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 64.233.166.183 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 64.233.166.183 py-out-1112.google.com Linux 2.4/2.6 Received: from [64.233.166.183] ([64.233.166.183:62431] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/D5-50866-F3189554 for ; Tue, 14 Nov 2006 03:41:35 -0500 Received: by py-out-1112.google.com with SMTP id u77so1004010pyb for ; Tue, 14 Nov 2006 00:41:32 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZeiNVMRYede3C/+h+Fr/ictYLzwPMXaXtKsdZG3fpr+ZXjFVh9MDsl+0L4Lq8EEW/liXFaBH70+iKUCc4PYW2uR+1VK2I6X7qGxR/S0RBRZzSCHzAAHFg27O0d8uAw3t6NjoG+gRGTYGl29hm7McZGz48rlIrzhVocYRoIIWT5g= Received: by 10.35.65.17 with SMTP id s17mr314835pyk.1163493692641; Tue, 14 Nov 2006 00:41:32 -0800 (PST) Received: by 10.35.97.14 with HTTP; Tue, 14 Nov 2006 00:41:32 -0800 (PST) Message-ID: <10845a340611140041p4cc13daft875f4fc99f1c8d19@mail.gmail.com> Date: Tue, 14 Nov 2006 08:41:32 +0000 Reply-To: RQuadling@GoogleMail.com To: "Stanislav Malyshev" Cc: "Antony Dovgal" , php-dev In-Reply-To: <45597FA6.90808@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4558E5E7.5040809@zend.com> <10845a340611140024l4902ea09q600a43c5018e819c@mail.gmail.com> <45597FA6.90808@zend.com> Subject: Re: [PHP-DEV] fgets()/fgetss() BC break in HEAD From: rquadling@googlemail.com ("Richard Quadling") Just because it has always done it doesn't mean it always will. That's what BC's are about. If this was to be a BC, having it mid version is not a good idea. Maybe for V6 where a whole LOAD of things are going to change, making it another part of the clean up process would be a better option. On 14/11/06, 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. > > > Make the break. Deal with it. It was wrong and now it is fixed. > > Yes, and the way to deal with it is to restore the function to its > previous functionality, according to documentation and the way it always > worked. If you need exact number, you can always use fread. There's > absolutely no reason to break 100% of working scripts (since nobody uses > the new semantics and everybody uses the old) just to satisfy someone's > sense of purity. > -- > Stanislav Malyshev, Zend Products Engineer > stas@zend.com http://www.zend.com/ > > -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"