Skip to content

Instantly share code, notes, and snippets.

@bnf
Created September 19, 2018 04:55
Show Gist options
  • Save bnf/5b0d366d6b9f7bd5b965f83f6e8cdedd to your computer and use it in GitHub Desktop.
Save bnf/5b0d366d6b9f7bd5b965f83f6e8cdedd to your computer and use it in GitHub Desktop.
list($childClass, $caller) = debug_backtrace(false, 2);
file_put_contents('./caller.log', $objectName . PHP_EOL . ' ' . $caller['class'] . '::' . $caller['function'] . PHP_EOL . ' ' . $childClass['file'] . ' (' . $childClass['line'] . ')' . PHP_EOL, FILE_APPEND);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment