catch(Exception $e
function inverso($x) {
if (!$x) {
throw new Exception('Zero division.');
}
return 1/$x;
}
try {
echo inverso(5) . "\n";
echo inverso(0) . "\n";
} catch (Exception $e) {
echo 'and the error is: ', $e->getMessage(), "\n";
}
Also in PHP:
- content type php header
- check laravel version
- cristal clear
- add page nos. to existing pdf in php
- artisan clear
- Laravel Excel numbers formatted as text still appearing as number
- all php errors
- clear laravel 5 cache\
- acheck key exist in array php
- check type of var in php
- SQLSTATE[42000] in laravel
- console.log from server php
- echo child category
- * in array key php
- A random character from a string of characters:
- 'laravel collective"Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
- april 6 2010 date format php
- $e = array("red", "green", "blue"); echo intval($e) . "<br>";
- clear route cache laravel
- base 64encryption is not happening in php
- add 1 day to the some date
- array key exist in phgp
- find index of a charachter charachrer isn string phph
- eader("Location