<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.reflection.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'reflection.examples.php',
    1 => 'Examples',
    2 => 'Examples',
  ),
  'up' => 
  array (
    0 => 'book.reflection.php',
    1 => 'Reflection',
  ),
  'prev' => 
  array (
    0 => 'book.reflection.php',
    1 => 'Reflection',
  ),
  'next' => 
  array (
    0 => 'reflection.extending.php',
    1 => 'Extending',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/examples.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflection.examples" class="chapter">
 <h1 class="title">Examples</h1>

 <p class="para">
  Many examples exist within the Reflection documentation, typically
  within the __construct documentation for each class.
 </p>
 <div class="example" id="example-1">
  <p><strong>Example #1 Reflection Example from Shell (a Terminal)</strong></p>
  <div class="example-contents">
<div class="annotation-interactive shellcode"><pre class="shellcode">$ php --rf strlen
$ php --rc finfo
$ php --re json
$ php --ri dom</pre>
</div>
  </div>

  <div class="example-contents"><p>The above example will output
something similar to:</p></div>
  <div class="example-contents screen">
<div class="annotation-interactive cdata"><pre>
Function [ &lt;internal:Core&gt; function strlen ] {

  - Parameters [1] {
    Parameter #0 [ &lt;required&gt; $str ]
  }
}

Class [ &lt;internal:fileinfo&gt; class finfo ] {

  - Constants [0] {
  }

  - Static properties [0] {
  }

  - Static methods [0] {
  }

  - Properties [0] {
  }

  - Methods [4] {
    Method [ &lt;internal:fileinfo, ctor&gt; public method finfo ] {

      - Parameters [2] {
        Parameter #0 [ &lt;optional&gt; $options ]
        Parameter #1 [ &lt;optional&gt; $arg ]
      }
    }

    Method [ &lt;internal:fileinfo&gt; public method set_flags ] {

      - Parameters [1] {
        Parameter #0 [ &lt;required&gt; $options ]
      }
    }

    Method [ &lt;internal:fileinfo&gt; public method file ] {

      - Parameters [3] {
        Parameter #0 [ &lt;required&gt; $filename ]
        Parameter #1 [ &lt;optional&gt; $options ]
        Parameter #2 [ &lt;optional&gt; $context ]
      }
    }

    Method [ &lt;internal:fileinfo&gt; public method buffer ] {

      - Parameters [3] {
        Parameter #0 [ &lt;required&gt; $string ]
        Parameter #1 [ &lt;optional&gt; $options ]
        Parameter #2 [ &lt;optional&gt; $context ]
      }
    }
  }
}

Extension [ &lt;persistent&gt; extension #23 json version 1.2.1 ] {

  - Constants [10] {
    Constant [ integer JSON_HEX_TAG ] { 1 }
    Constant [ integer JSON_HEX_AMP ] { 2 }
    Constant [ integer JSON_HEX_APOS ] { 4 }
    Constant [ integer JSON_HEX_QUOT ] { 8 }
    Constant [ integer JSON_FORCE_OBJECT ] { 16 }
    Constant [ integer JSON_ERROR_NONE ] { 0 }
    Constant [ integer JSON_ERROR_DEPTH ] { 1 }
    Constant [ integer JSON_ERROR_STATE_MISMATCH ] { 2 }
    Constant [ integer JSON_ERROR_CTRL_CHAR ] { 3 }
    Constant [ integer JSON_ERROR_SYNTAX ] { 4 }
  }

  - Functions {
    Function [ &lt;internal:json&gt; function json_encode ] {

      - Parameters [2] {
        Parameter #0 [ &lt;required&gt; $value ]
        Parameter #1 [ &lt;optional&gt; $options ]
      }
    }
    Function [ &lt;internal:json&gt; function json_decode ] {

      - Parameters [3] {
        Parameter #0 [ &lt;required&gt; $json ]
        Parameter #1 [ &lt;optional&gt; $assoc ]
        Parameter #2 [ &lt;optional&gt; $depth ]
      }
    }
    Function [ &lt;internal:json&gt; function json_last_error ] {

      - Parameters [0] {
      }
    }
  }
}

dom

DOM/XML =&gt; enabled
DOM/XML API Version =&gt; 20031129
libxml Version =&gt; 2.7.3
HTML Support =&gt; enabled
XPath Support =&gt; enabled
XPointer Support =&gt; enabled
Schema Support =&gt; enabled
RelaxNG Support =&gt; enabled
</pre></div>
  </div>
 </div>
</div>
<?php manual_footer($setup); ?>