Created
September 1, 2021 07:38
-
-
Save dixyes/1bce49ad107863100eb108d69ab9bf0a to your computer and use it in GitHub Desktop.
php -x
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 | |
$file = explode("\n", file_get_contents(__FILE__)); | |
\Swow\Debug\registerExtendedStatementHandler(function () use ($file) { | |
$bt = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 1)[0]; | |
if ($bt['file'] === __FILE__) { | |
echo $bt['line'] . ':' . $file[$bt['line'] - 1] . PHP_LF; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment