$Dbg->stopTimer();
$Dbg->dump($debug_line2);
// Test the database functions =================================================
// Database related info
$Dbg->queryRel('Connecting to DATABASE [<b>phpdebug</b>] dns: root:user@mysql');
$Dbg->stopTimer();
// Query
$Dbg->query('SELECT * FROM PHP_DEBUG_USERS');
$y = 0;
for ($index = 0; $index < 10000; $index++) {
    $y = $y + $index;
}
$Dbg->stopTimer();
// Test custom error handler ===================================================
echo $notset;
// Will raise a PHP notice
fopen('not existing!', 'r');
// Will raise a PHP warning
trigger_error('This is a custom application error !!', E_USER_ERROR);
// Will raise a custom user error
$Dbg->error('Bad status of var x in application PHP_Debug');
// Will add an application error
// Display Debug information (HTML_Table renderer) =============================
$Dbg->display();
// Test __toString(), dumpVar() functions and structure of Debug object ========
//echo $Dbg;
// END =========================================================================
?>

</body>
</html>
Exemple #2
0
}
?>
    <link rel="stylesheet" href="css/style.css">
  </head>
  <body>
    <div id="header-container">
      <header class="wrapper clearfix">
        <h1 id="title">Debugging PHP Advanced Techniques</h1>
      </header>
    </div>
    <div id="main-container">
      <div id="main" class="wrapper clearfix">
        <article><?php 
require_once 'demo.php';
?>
</article>
      </div> <!-- #main -->
    </div> <!-- #main-container -->
    <div id="footer-container">
      <footer class="wrapper">
        <h3></h3>
      </footer>
    </div>
    <?php 
if ($tools['phpdebug']) {
    $PHP_Debug->display();
}
?>
  </body>
</html>