> The @ operator no longer silences fatal errors
Interesting. There are still some legitimate (well, “legitimate”) use cases for that behavior e.g. with PHP’s native XML extensions.
Interesting. There are still some legitimate (well, “legitimate”) use cases for that behavior e.g. with PHP’s native XML extensions.
However you could just catch Exception. Not sure why a parse error is a "Fatal error".
A xml parsing error in the SimpleXmlElement constructor is not a fatal error - it throws an exception.
An uncaught exception is a fatal error.