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. <html>
  2. <style>
  3.         /* style for XHTML_Text */
  4.     pre.var_dump            { line-height:1.8em; }
  5.     pre.var_dump span.type  { color:#006600; background:transparent; }
  6.     pre.var_dump span.value { padding:2px; color:#339900; background:#F0F0F0; border: 1px dashed #CCCCCC; }
  7. </style>
  8. <body>
  9. <?php
  10.  
  11. include_once 'Var_Dump.php';
  12.  
  13. echo '<h1>example5.php : Text displaying modes</h1>';
  14.  
  15. /*
  16.  * example5.php : Text displaying modes
  17.  *
  18.  */
  19.  
  20. $fileHandler=tmpfile();
  21. $linkedArray=array(0=>'John'11=>'Jack'127=>'Bill');
  22. $array=array(
  23.     'key-1' => 'The quick brown fox jumped over the lazy dog',
  24.     'long-key-2' => 234,
  25.     'key-3' => array(
  26.         'key31' => 31.789,
  27.         'long-key-3-2' => $linkedArray,
  28.         'file' => $fileHandler
  29.     ),
  30.     'key-4' => NULL
  31. );
  32.  
  33. echo '<h2>Compact mode (offset 4)</h2>';
  34. Var_Dump::displayInit(
  35.     array(
  36.         'display_mode'=>'HTML4_Text'
  37.     ),
  38.     array(
  39.         'mode'=>'compact',
  40.         'offset'=>4
  41.     )
  42. );
  43. Var_Dump::display($array);
  44.  
  45. echo '<h2>Normal mode (offset 4)</h2>';
  46. Var_Dump::displayInit(
  47.     array(
  48.         'display_mode'=>'HTML4_Text'
  49.     ),
  50.     array(
  51.         'mode'=>'normal',
  52.         'offset'=>4
  53.     )
  54. );
  55. Var_Dump::display($array);
  56.  
  57. echo '<h2>Wide mode (offset 4)</h2>';
  58. Var_Dump::displayInit(
  59.     array(
  60.         'display_mode'=>'HTML4_Text'
  61.     ),
  62.     array(
  63.         'mode'=>'wide',
  64.         'offset'=>4
  65.     )
  66. );
  67. Var_Dump::display($array);
  68.  
  69. fclose($fileHandler);
  70.  
  71. ?>
  72. <body>
  73. </html>

Documentation generated on Mon, 11 Mar 2019 10:16:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.