Skip to content

Instantly share code, notes, and snippets.

@cmb69

cmb69/.php Secret

Created November 25, 2020 18:55
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 cmb69/076c484387aee43d4c61b132994d8da9 to your computer and use it in GitHub Desktop.
Save cmb69/076c484387aee43d4c61b132994d8da9 to your computer and use it in GitHub Desktop.
PEAR CS demo
<?php
class SpecificException extends Exception
{}
function test()
{
do_something_risky() or throw new Exception('It did not work');
}
try {
test();
} catch (Exception $e) {
print $e->getMessage();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment