/ Published in: PHP
A simple replacement for print_r or whatever you use to display debug info.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * simple display function for debugging * * @param mix $mixObj * @param string $strLabel */ function display( $mixObj, $strLabel = null) { // show nothing on production server echo " <div style=\"border: 1px dotted #000; width: 100%;\"> <strong>$strLabel</strong> - Called from: " .$backtrace[0]['file'] . " (line " . $backtrace[0]['line'] . ") </div>"; } }
URL: http://twitter.com/PeteWilliams