php - Break from try/catch block -


is possible in php?

try{    $obj = new clas();    if($obj->foo){     // how exit try block?   }    // other stuff here  }catch(exception $e){  ] 

i know can put other stuff between {}, increases indenting on bigger code block , don't :p

i know increases indentation an answer

try {     $obj = new clas();     if ($obj->foo)     {         // stuff here     }     else     {         // other stuff here     } } catch (exception $e) {      // handle exceptions here } 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -