cvs: peardoc /peardoc2/en/pecl bcompiler.xml

From: Date: Fri, 24 Jan 2003 19:33:01 +0000
Subject: cvs: peardoc /peardoc2/en/pecl bcompiler.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-311@lists.php.net to get a copy of this message
xnoguer Fri Jan 24 14:33:01 2003 EDT Modified files: /peardoc/peardoc2/en/pecl bcompiler.xml Log: adding bcompiler_write_constant() Index: peardoc/peardoc2/en/pecl/bcompiler.xml diff -u peardoc/peardoc2/en/pecl/bcompiler.xml:1.3 peardoc/peardoc2/en/pecl/bcompiler.xml:1.4 --- peardoc/peardoc2/en/pecl/bcompiler.xml:1.3 Wed Jan 22 10:19:11 2003 +++ peardoc/peardoc2/en/pecl/bcompiler.xml Fri Jan 24 14:33:01 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <reference id="pecl.bcompiler"> <title>PHP bytecode Compiler</title> <titleabbrev>bcompiler</titleabbrev> @@ -184,6 +184,52 @@ bcompiler_write_header($fh); bcompiler_write_function($fh,"my_function_a"); bcompiler_write_function($fh,"my_function_b"); +bcompiler_write_footer($fh); +fclose($fh); + +?> +]]> + </programlisting> + </example> + <para> + See also: <function>bcompiler_write_header</function>, <function>bcompiler_write_footer</function>. + </para> + </refsect1> + </refentry> + + +<!-- constant --> + + + <refentry id="pecl.bcompiler.bcompile-write-constant"> + <refnamediv> + <refname>bcompiler_write_constant</refname> + <refpurpose>Writes a defined constant as bytecodes</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef><function>bcompiler_write_constant</function></funcdef> + <paramdef>resource <parameter>filehandle</parameter></paramdef> + <paramdef>string <parameter>constantName</parameter></paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + This function reads the bytecodes from PHP for an existing constant, and writes them to the + open file handle. + </para> + <example> + <title><function>bcompiler_write_constant</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +define("MODULE_MAX", 30); + +$fh = fopen("/tmp/example","w"); +bcompiler_write_header($fh); +bcompiler_write_constant($fh,"MODULE_MAX"); bcompiler_write_footer($fh); fclose($fh);

« previous php.pear.doc (#311) next »