File: test/index.php

Recommend this page to a friend!
  Classes of Leon Sorokin  >  dump_r  >  test/index.php  >  Download  
File: test/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: dump_r
Display values of variables
Author: By
Last change: remove explicit Type::$dic clearing from test/example. #41.
Date: 6 years ago
Size: 1,148 bytes


Class file image Download
require __DIR__ . '/../dump_r.php';
__DIR__ . '/obj.php';

// dump_r\Rend::$sql_pretty = true;
// dump_r\Rend::$xml_pretty = true;
// dump_r\Rend::$json_pretty = true;

?><!DOCTYPE html>

        <h2>html (default)</h2>
        <?php dump_r($obj); ?>

        <h2>limited pre-expand and recursion</h2>
            .dump_r .myVals > * {
                background: lightyellow !important;
($obj, false, true, 2, 1);

= dump_r($obj, true, false, 1e3, 1);
htmlspecialchars($ascii, ENT_NOQUOTES);

        <h2>limited recursion</h2>
= dump_r($obj, true, false, 1, 1);
htmlspecialchars($ascii, ENT_NOQUOTES);

        <h2>native print_r()</h2>
        <pre><?=print_r($obj, true)?></pre>

        <h2>native var_dump()</h2>
        <pre><? var_dump($obj); ?></pre>

        <a href=""><img style="position: absolute; top: 0; right: 0; border: 0;" src="" alt="Fork me on GitHub"></a>

For more information send a message to info at phpclasses dot org.