Q:

Disable errors in PHP

How to disable errors just for particular php function, and in the same time to know that the error occurred? For instance, I use a php function parse_url, to parse an array of urls, sometimes it returns an error, what I want to do is to parse next url once error occurs, and not to show it(error) on the screen.

A:

You might want to take a look at set_error_handler().
You can do anything you want registering your own handler.

A:

the @ symbol before a function will suppress the error message and parse_url() returns false on erroring so just catch that.   
 if(@parse_url($url) === false) {
        //Error has been caught here
    }

