SnippetVamp

Parce que yen a marre de chercher ses bouts de code partout...



TODO 1 ajax 3 astuce 68 auto_ 2 bash 1 bootstrap 14 conversion 2 crossbrowser 3 css 50 debug 10 dothtaccess 1 effets 1 erreurs 1 evenements 2 fallback 1 fichiers 27 filter 1 fonctions 73 form 1 graphisme 11 html 39 javascript 39 jquery 26 lib 2 mail 1 markdown 2 mobile 2 parser 13 php 91 pluXML 4 python 10 responsive 8 securite 17 social 1 texte 16 vanilla 4

.

n_print: tracer les variables sans exit();

n_print: tracer les variables sans exit();

<?php
/**
* Améliore la sortie print
*
* @author Tatane http://www.tatane.info/index.php/print_rn
* @author http://www.blog.cactuscrew.com/77-print_rn.html
* @param $data (array) tableau ou variable à examiner
* @param $name (string) nom a afficher
* @return false affiche les clef valeur du tableau $data
* @example n_print($array, 'Tableau de valeur');
*/
function n_print($data, $name = '') {
$aBackTrace = debug_backtrace();
echo '<h2>', $name, '</h2>';
echo '<fieldset style="border: 1px solid orange; padding: 5px;color: #333; background-color: #fff;">';
echo '<legend style="border:1px solid orange;padding: 1px;background-color:#eee;color:orange;">', basename($aBackTrace[0]['file']), ' ligne => ', $aBackTrace[0]['line'], '</legend>';
echo '<pre>', htmlentities(print_r($data, 1)), '</pre>';
echo '</fieldset><br />';
}
?>

php fonctions debug

http://shaarlet.knah-tsaeb.org/?HsF04A

<iframe width="100%" height="542" src="http://snippetvamp.warriordudimanche.net/snippetvamp.php?embed=51778cead8721" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 24/04/2013

Flux RSS de cette page


SnippetVamp 1.83 par Bronco - Page générée en 0.006 s