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

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -