Last active
April 3, 2019 21:57
-
-
Save Ricardolau/1a1f617bcfef88229c00dbc04aa69ca5 to your computer and use it in GitHub Desktop.
Debug php
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
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>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fuente: https://www.php.net/manual/es/function.debug-backtrace.php