Hi!

@ is often used to stop error/warning output to the browser on that line, but the next couple lines of code are used to handle that error. For example:

if (!($dom = @DOMDocument::load($file_name))) {
    log_it('invalid XML: ' . $php_errormsg);
    die('invalid XML');
}

So if error processing is totally turned off, $php_errormsg won't be populated.

That's true. So, if you use code that uses $php_errormsg, of course you can not use this optimization and should not enable it (at least for error types and code parts that you use $php_errormsg with). Also, if you use @ to stop warning output to the browser you should read the manual about display_errors and part of the security guidelines when it says never enable display_errors in production ;)
--
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

Reply via email to