Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56392 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69018 invoked from network); 18 Nov 2011 13:08:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2011 13:08:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain prohost.org designates 209.85.215.170 as permitted sender) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 209.85.215.170 mail-ey0-f170.google.com Received: from [209.85.215.170] ([209.85.215.170:63526] helo=mail-ey0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/5A-06569-0D856CE4 for ; Fri, 18 Nov 2011 08:08:33 -0500 Received: by eyg7 with SMTP id 7so3406935eyg.29 for ; Fri, 18 Nov 2011 05:08:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.19.82 with SMTP id m58mr254289eem.104.1321621709040; Fri, 18 Nov 2011 05:08:29 -0800 (PST) Received: by 10.14.127.75 with HTTP; Fri, 18 Nov 2011 05:08:28 -0800 (PST) In-Reply-To: <4EC5E75D.80801@sugarcrm.com> References: <0DA562DA-2556-4179-8BB4-834313B6B9FB@bitextender.com> <4EC5E75D.80801@sugarcrm.com> Date: Fri, 18 Nov 2011 08:08:28 -0500 Message-ID: To: Stas Malyshev Cc: =?ISO-8859-1?Q?David_Z=FClke?= , "Matthew Weier O'Phinney" , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Results of testing ZF against PHP 5.4.0RC1 From: ilia@prohost.org (Ilia Alshanetsky) I agree with Stas' point there is really no need to force people do the while (ob_get_level()) ob_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 > >