Last active
September 21, 2016 06:01
-
-
Save suzuken/9ea88263f932000dfdcbcb15968ca461 to your computer and use it in GitHub Desktop.
This file contains 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 | |
function main() { | |
kuke(); | |
} | |
function kuke() { | |
hoge(); | |
} | |
function hoge() { | |
trigger_error(format(debug_backtrace()), E_USER_DEPRECATED); | |
} | |
function format($caller) { | |
$r = array(); | |
foreach ($caller as $c) { | |
$r []= sprintf("%s called from %s on line %s", $c['function'], $c['file'], $c['line']); | |
} | |
return implode($r, " => "); | |
} | |
main(); |
Author
suzuken
commented
Sep 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment