Created
August 7, 2017 18:33
-
-
Save synsh/f3b7cc8cb9ff243de39742633fa843f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app->get('/exception', function ($req, $res, $args) { | |
// errorHandler will trap this Exception | |
throw new Exception("An error happened here"); | |
}); | |
$app->get('/php7', function ($req, $res, $args) { | |
$x = function (int $x) { | |
return $x; | |
}; | |
// phpErrorHandler wil trap this Error | |
$x('test'); | |
}); | |
$app->get('/warning', function ($req, $res, $args) { | |
$x = UNDEFINED_CONSTANT; | |
echo "string"; | |
}); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment