mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 18:38:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297028 c90b9560-bf6c-de11-be94-00142212c4b1
121 lines
3.2 KiB
XML
121 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.parsekit-compile-file" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>parsekit_compile_file</refname>
|
|
<refpurpose>Compile a string of PHP code and return the resulting op array</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>parsekit_compile_file</methodname>
|
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter role="reference">errors</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>PARSEKIT_QUIET</initializer></methodparam>
|
|
</methodsynopsis>
|
|
&warn.experimental.func;
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>filename</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
A string containing the name of the file to compile.
|
|
Similar to the argument to <function>include</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>errors</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
A 2D hash of errors (including fatal errors) encountered during compilation.
|
|
Returned by reference.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
One of either <constant>PARSEKIT_QUIET</constant> or
|
|
<constant>PARSEKIT_SIMPLE</constant>. To produce varying
|
|
degrees of verbosity in the returned output.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns a complex multi-layer array structure as detailed below.
|
|
</para>
|
|
</refsect1>
|
|
<!-- No changelog: it's only in PECL. -->
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>parsekit_compile_file</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
var_dump(parsekit_compile_file('hello_world.php', $errors, PARSEKIT_SIMPLE));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
array(5) {
|
|
[0]=>
|
|
string(37) "ZEND_ECHO UNUSED 'Hello World' UNUSED"
|
|
[1]=>
|
|
string(30) "ZEND_RETURN UNUSED NULL UNUSED"
|
|
[2]=>
|
|
string(42) "ZEND_HANDLE_EXCEPTION UNUSED UNUSED UNUSED"
|
|
["function_table"]=>
|
|
NULL
|
|
["class_table"]=>
|
|
NULL
|
|
}
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>parsekit_compile_string</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|