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' => 'This is an example of string',
  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. $obj Var_Dump::singleton(array('display_mode' => 'HTML4_Text'),array('mode'=>'compact','offset'=>4));
  35. Var_Dump::display($array);
  36.  
  37. echo '<h2>Normal mode (offset 4)</h2>';
  38. $obj Var_Dump::singleton(array('display_mode' => 'HTML4_Text'),array('mode'=>'normal','offset'=>4));
  39. Var_Dump::display($array);
  40.  
  41. echo '<h2>Wide mode (offset 4)</h2>';
  42. $obj Var_Dump::singleton(array('display_mode' => 'HTML4_Text'),array('mode'=>'wide','offset'=>4));
  43. Var_Dump::display($array);
  44.  
  45. ?>
  46. <body>
  47. </html>

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