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(); |
PHP Deprecated: kuke: in hoge called from /private/tmp/e.php on line 5 in /private/tmp/e.php on line 26
PHP Deprecated: : in hoge called from /private/tmp/e.php on line 5 in /private/tmp/e.php on line 22
PHP Deprecated: : in main called from /private/tmp/e.php on line 29 in /private/tmp/e.php on line 14
PHP Deprecated: hoge called from /private/tmp/e.php on line 8
kuke called from /private/tmp/e.php on line 4
main called from /private/tmp/e.php on line 23
in /private/tmp/e.php on line 12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
like that