Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

https://3v4l.org/saHj2

However you could just catch Exception. Not sure why a parse error is a "Fatal error".



A PHP parse error (of your code) 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: