This is an old revision of the document!
Das ist ein Script mit dem man nicht ständig <pre> … </pre> Tags selbst schreiben muss und auch nicht immer var_dump() tippen muss. Die Funktion ist eher aus Faulheit entstanden, will aber nicht mehr drauf verzichten.
<?php /** * Debug Helper, der eine HTML var_dump Ausgabe erzeugt * * @param mixed $obj Variable für den var_dump * @param boolean $title Optional. Titel über der <pre> Ausgabe * * @return void */ function d( $obj, $title = false ){ echo "<div class=\"debug\">"; if( $title ) { echo "<h3 class=\"debug__title\">" . $title . "</h3>"; } echo "<pre class=\"debug__print\">"; var_dump( $obj ); echo "</pre>"; echo "</div>"; };
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International