Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56394 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73934 invoked from network); 18 Nov 2011 13:27:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2011 13:27:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:60352] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/4B-06569-24D56CE4 for ; Fri, 18 Nov 2011 08:27:30 -0500 Received: by ywm19 with SMTP id 19so2790390ywm.29 for ; Fri, 18 Nov 2011 05:27:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Dow2d4QqhkIeFQyZXk2U652dv+AtVh1ZLbb8NgSDBzE=; b=RkCbG/zCb5GPf0Yndsq1Jih9mIgIf8WnhfvGPJIL8NPFrmy3cHH+mjvqzrYVJaB0DP ZBAbtrt5VOw8rNON/JJoVHA8CkuIPec/lETz9MjbwnKaIl3CESTQWegdFhe76B/pTBeP vDLe/GbsGtz5+7M5+xlBlLakDiD1yuxCV7sJo= MIME-Version: 1.0 Received: by 10.100.208.8 with SMTP id f8mr574431ang.11.1321622847083; Fri, 18 Nov 2011 05:27:27 -0800 (PST) Received: by 10.147.99.18 with HTTP; Fri, 18 Nov 2011 05:27:27 -0800 (PST) In-Reply-To: References: <0DA562DA-2556-4179-8BB4-834313B6B9FB@bitextender.com> <4EC5E75D.80801@sugarcrm.com> Date: Fri, 18 Nov 2011 14:27:27 +0100 Message-ID: To: Ilia Alshanetsky Cc: Stas Malyshev , =?ISO-8859-1?Q?David_Z=FClke?= , "Matthew Weier O'Phinney" , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Results of testing ZF against PHP 5.4.0RC1 From: pierre.php@gmail.com (Pierre Joye) same here, and for any other places in the ob_* APIs. Functions returns false on error, cleaning something already cleaned or empty is not an erro. On Fri, Nov 18, 2011 at 2:08 PM, Ilia Alshanetsky wrote: > I agree with Stas' point there is really no need to force people do > the while (ob_get_level()) =A0ob_end_clean(); loop or "force" people to > use the @ob_end_clean(); to avoid notices. If there are no buffers to > clear it should be a noop, without any notices being raised. > > On Fri, Nov 18, 2011 at 12:04 AM, Stas Malyshev = wrote: >> Hi! >> >>> First of all, ob_clean() and ob_end_clean() will raise the same >>> notice even in PHP 5.3. It seems inconsistent to me to treat these >>> three differently, so in that regard, PHP 5.4 is actually fixing >>> behavior (although arguably the other way to approach the problem is >>> to remove the notice from all three of them). >> >> I don't think ob_end_clean() should produce notices, otherwise it leads >> to needless boilerplate code like: >> >> if(ob_get_evel()>0) ob_end_clean(); >> >> while you could just write ob_end_clean() and be done with it. >> ob_clean() is trickier since it's supposed to leave buffer in place, but >> for functions that are supposed to remove the buffer warning doesn't add >> any value, only makes people write uglier code. >> -- >> Stanislav Malyshev, Software Architect >> SugarCRM: http://www.sugarcrm.com/ >> (408)454-6900 ext. 227 >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org