Skip to content

Instantly share code, notes, and snippets.

@Ricardolau
Last active April 3, 2019 21:57
Show Gist options
  • Save Ricardolau/1a1f617bcfef88229c00dbc04aa69ca5 to your computer and use it in GitHub Desktop.
Save Ricardolau/1a1f617bcfef88229c00dbc04aa69ca5 to your computer and use it in GitHub Desktop.
Debug php
echo '<pre>';
$debugs = debug_backtrace();
print_r('Cantidad:'.count($debugs).'<br/>');
foreach ($debugs as $debug){
echo 'linea:'.$debug['line'].' del fichero:'.$debug['file'];
if ($debug['object']){
echo '<br/> Objeto->'.get_class($debug['object']).'<br/>';
}
echo '<br/> funcion:'.$debug['function'];
if($debug['class']){
echo ' clase:'.$debug['class'];
}
echo '<br/>Argumentos:'.'<br/>';
print_r($debug['args']);
echo '<br/>';
}
echo '</pre>';
@Ricardolau
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment