Can I try/catch a warning?
I need to catch some warnings being thrown from some php native functions and then handle them. Specifically: array dns_get_record ( string $hostname [, int $type= DNS_ANY [, array &$authns [, array &$addtl ]]] ) It throws a warning when the DNS query fails. try/catch doesn’t work because a warning is not an exception. I … Read more