> Resume is similar to return, but can only be used in catch blocks or > in error handling functions. When encountered the run time returns to > the line after the exception was initially thrown and, well, > "resumes".
Interesting idea. Just by reading that I thought of this scenario instead: --------------- try { echo "about to throw exception"; throw new Exception; echo "still alive"; } catch (Exception $e) { resume; } ------------- Which kinda looks nice to have. But how about this: -------------- function my_function() { echo "throwing exception"; throw new Exception; echo "still here?"; } try { echo "calling function"; my_function(); } catch (Exception $e) { resume; } ---------------- By the time the exception is handled, the function stack would have been unloaded, so how would it be able to resume? :) > > If resume has a value, and the exception was an assignment operation, > then that value is assigned to the variable. This feels a bit too magical IMO -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php