Hi!
Lukas, the problem is that all messages, E_STRICT, E_DEPRECATED,
E_NOTICE, whatever, all cause a performance hit even if the
error_reporting level is such that they will never show up anywhere.
That's what this patch is trying to address. To write optimal code,
they have to be entirely clean of all messages including E_DEPRECATED
and E_STRICT.
BTW "cleaning the messages" won't help with performance problems in many
cases. Let's suppose you have a code that tries to open some file and if
it exists, do stuff (and if it doesn't it doesn't care):
$fp = @fopen($filename, "r");
if($fp) {
// do stuff
}
Now if you "clean" it, you do something like:
if(is_readable($filename)) {
$fp = fopen($filename, "r");
// do stuff
}
(and if you don't want race condition there, you still need the if()).
Then is_readable and fopen can still can't be guaranteed to not produce
warnings if there are open_basedir restrictions or streams involved or
FS could change in the meanitime. But now instead of one FS access, you
have two - not much of a speedup.
--
Stanislav Malyshev, Zend Software Architect
s...@zend.com http://www.zend.com/
(408)253-8829 MSN: s...@zend.com
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php