Does PHP Try Catch freezes the page?

Posted by serhio on Stack Overflow See other posts from Stack Overflow or by serhio
Published on 2010-05-07T16:16:47Z Indexed on 2010/05/07 16:18 UTC
Read the original article Hit count: 323

Filed under:
|

I have the following code

function displaySomeFeeds($urls, $keywords = NULL)
{
    error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE);
    echo "<ul>";    
    foreach ($urls as $url) {
        try
        {
            displayFeed($url, $keywords, NULL, false);
        }       
        catch(Exception $e)
        {
            //echo "Error when obtaining news from '$url': " .$e->getMessage();
        } 
    }
    echo "</ul>";       
}

When I use it with Try Catch, the pages loads very, very, very slow.

When I use it without Try/Catch the pages loads normally, but with error messages.

Could I ammeliorate the time of response with Try/Catch?

© Stack Overflow or respective owner

Related posts about php

Related posts about try-catch