Var_Dump
[ class tree: Var_Dump ] [ index: Var_Dump ] [ all elements ]

Source for file example-5.php

Documentation is available at example-5.php

  1. <?php
  2. header('Content-Type: application/xhtml+xml; charset=utf-8');
  3. header('Vary: Accept')
  4. ?>
  5. <?xml version="1.0" encoding="UTF-8"?>
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  7.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  9. <head>
  10.     <title>An XHTML 1.0 Strict standard template</title>
  11.     <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  12.     <meta http-equiv="Content-Style-Type" content="text/css" />
  13.     <style>
  14.         /* style for XHTML_Text */
  15.         pre.var_dump            { line-height:1.8em; }
  16.         pre.var_dump span.type  { color:#006600; background:transparent; }
  17.         pre.var_dump span.value { padding:2px; color:#339900; background:#F0F0F0; border: 1px dashed #CCCCCC; }
  18.     </style>
  19. </head>
  20. <body>
  21.  
  22. <?php
  23.  
  24. include_once 'Var_Dump.php';
  25.  
  26. echo '<h1>example5.php : Text displaying modes</h1>';
  27.  
  28. /*
  29.  * example5.php : Text displaying modes
  30.  *
  31.  */
  32.  
  33. $fileHandler tmpfile();
  34. $linkedArray = array(0 => 'John'11 => 'Jack'127 => 'Bill');
  35. $array = array(
  36.     'key-1' => 'The quick brown fox jumped over the lazy dog',
  37.     'key-2' => array(
  38.         'long-key' => $linkedArray,
  39.         'file' => $fileHandler
  40.     ),
  41.     'long-key-3' => 234,
  42. );
  43.  
  44. echo '<h2>Compact mode (offset 4)</h2>';
  45.     array(
  46.         'display_mode' => 'HTML4_Text'
  47.     ),
  48.     array(
  49.         'mode' => 'compact',
  50.         'offset' => 4
  51.     )
  52. );
  53. Var_Dump::display($array);
  54.  
  55. echo '<h2>Normal mode (offset 4)</h2>';
  56.     array(
  57.         'display_mode' => 'HTML4_Text'
  58.     ),
  59.     array(
  60.         'mode' => 'normal',
  61.         'offset' => 4
  62.     )
  63. );
  64. Var_Dump::display($array);
  65.  
  66. echo '<h2>Wide mode (offset 4)</h2>';
  67.     array(
  68.         'display_mode' => 'HTML4_Text'
  69.     ),
  70.     array(
  71.         'mode' => 'wide',
  72.         'offset' => 4
  73.     )
  74. );
  75. Var_Dump::display($array);
  76.  
  77. fclose($fileHandler);
  78.  
  79. ?>
  80.  
  81. </body>
  82. </html>

Documentation generated on Mon, 11 Mar 2019 15:38:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.