Skip to content

Instantly share code, notes, and snippets.

@quinn
Created June 12, 2014 20:38
Show Gist options
  • Save quinn/a78a457b9510cc046f7c to your computer and use it in GitHub Desktop.
Save quinn/a78a457b9510cc046f7c to your computer and use it in GitHub Desktop.
error output
<?php
register_shutdown_function('what_happened');
function what_happened () {
$reflFunc = new ReflectionFunction('ldap_escape');
echo "\nthe function location:\n";
echo $reflFunc->getFileName() . ':' . $reflFunc->getStartLine() . "\n";
var_dump($reflFunc);
echo "the error:\n";
echo var_dump(error_get_last());
}
include_once('cleanup_funcs.php');
the function location:
:
object(ReflectionFunction)#1 (1) {
["name"]=>
string(11) "ldap_escape"
}
the error:
array(4) {
["type"]=>
int(64)
["message"]=>
string(30) "Cannot redeclare ldap_escape()"
["file"]=>
string(66) "/Users/quinn/Code/reason_package/carl_util/basic/cleanup_funcs.php"
["line"]=>
int(124)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment