Re: Results of testing ZF against PHP 5.4.0RC1

From: Date: Fri, 18 Nov 2011 05:04:29 +0000
Subject: Re: Results of testing ZF against PHP 5.4.0RC1
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-56381@lists.php.net to get a copy of this message
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

« previous php.internals (#56381) next »