Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 10793

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Examples</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="reflection.constants.html">Predefined Constants</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="reflection.extending.html">Extending</a></div>
 <div class="up"><a href="book.reflection.html">Reflection</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="reflection.examples" class="chapter">
 <h1>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-5178">
  <p><strong>Example #1 Reflection Example from Shell (a Terminal)</strong></p>
  <div class="example-contents">
<div class="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="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>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="reflection.constants.html">Predefined Constants</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="reflection.extending.html">Extending</a></div>
 <div class="up"><a href="book.reflection.html">Reflection</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>