Skip to content

Instantly share code, notes, and snippets.

@EdwardIII
Created November 19, 2015 11:31
Show Gist options
  • Save EdwardIII/711b42d0c014397238d8 to your computer and use it in GitHub Desktop.
Save EdwardIII/711b42d0c014397238d8 to your computer and use it in GitHub Desktop.
<?php
try {
explode('not an array');
}catch(\Exception $e){
echo "Couldn't explode";
}
/* Outputs:
PHP Warning: explode() expects at least 2 parameters, 1 given in /private/tmp/test.php on line 4
PHP Stack trace:
PHP 1. {main}() /private/tmp/test.php:0
PHP 2. explode() /private/tmp/test.php:4
Warning: explode() expects at least 2 parameters, 1 given in /private/tmp/test.php on line 4
Call Stack:
0.0002 226608 1. {main}() /private/tmp/test.php:0
0.0003 226704 2. explode() /private/tmp/test.php:4
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment