note 104791 added to language.exceptions
| From: | contact at xpertmailer dot com | Date: | Thu, 07 Jul 2011 13:19:20 +0000 |
| Subject: | note 104791 added to language.exceptions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181314@lists.php.net to get a copy of this message | ||
To continue the execution code after throw new Exception, goto operator can be used, like this:
<?php
try {
echo 'one';
throw new Exception('-error-'); a:
echo 'two';
} catch (Exception $e) {
echo $e->getMessage();
goto a;
}
//output: one-error-two
?>
But, goto operator can NOT be evaluate or get a value:
<?php
eval('goto a;'); //Fatal error: 'goto' to undefined label 'a'
$b = 'a';
goto $b; //Parse error: syntax error, unexpected T_VARIABLE, expecting T_STRING
?>
----
Server IP: 69.147.83.197
Probable Submitter: 79.117.73.24
----
Manual Page -- http://www.php.net/manual/en/language.exceptions.php
Edit -- https://master.php.net/note/edit/104791
Del: integrated -- https://master.php.net/note/delete/104791/integrated
Del: useless -- https://master.php.net/note/delete/104791/useless
Del: bad code -- https://master.php.net/note/delete/104791/bad+code
Del: spam -- https://master.php.net/note/delete/104791/spam
Del: non-english -- https://master.php.net/note/delete/104791/non-english
Del: in docs -- https://master.php.net/note/delete/104791/in+docs
Del: other reasons-- https://master.php.net/note/delete/104791
Reject -- https://master.php.net/note/reject/104791
Search -- https://master.php.net/manage/user-notes.php