Skip to content

Instantly share code, notes, and snippets.

@c9s
Created June 17, 2014 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c9s/c7e9969ff9448b90e6e0 to your computer and use it in GitHub Desktop.
Save c9s/c7e9969ff9448b90e6e0 to your computer and use it in GitHub Desktop.
<?php
function foo() {
try {
// throw new YoubikeException;
throw new Exception;
} catch (Exception $e) {
echo 'Caught Exception: ', get_class($e), "\n";
return 1;
} finally {
echo 'Finally block';
return 2;
}
return 3;
}
$ret = foo();
var_dump( $ret ); // got 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment