Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26551 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89057 invoked by uid 1010); 14 Nov 2006 08:34:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89042 invoked from network); 14 Nov 2006 08:34:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Nov 2006 08:34:53 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; 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: stas@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:41706] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/55-50866-7AF79554 for ; Tue, 14 Nov 2006 03:34:53 -0500 Received: (qmail 9908 invoked from network); 14 Nov 2006 08:33:19 -0000 Received: from unknown (HELO ?127.0.0.1?) (192.168.2.100) by internal.zend.office with SMTP; 14 Nov 2006 08:33:19 -0000 Message-ID: <45597FA6.90808@zend.com> Date: Tue, 14 Nov 2006 00:34:46 -0800 Organization: Zend Technologies User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: RQuadling@GoogleMail.com CC: Antony Dovgal , 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: stas@zend.com (Stanislav Malyshev) > 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/