MFB: Upgrade to the new-reference-structure

- Moved the intro from reference.xml to book.xml
    - Change the intro ID to intro.<extname>


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@247969 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2007-12-11 06:49:01 +00:00
parent 7ec7609c00
commit 3c3dbdd75c
4 changed files with 184 additions and 81 deletions

View file

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- Purpose: basic.php -->
<!-- Membership: pecl -->
<!-- State: experimental -->
<book xml:id="book.bcompiler" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>PHP bytecode Compiler</title>
<titleabbrev>bcompiler</titleabbrev>
<preface xml:id="intro.bcompiler">
&reftitle.intro;
&warn.experimental;
<para>
Bcompiler was written for several reasons:
<simplelist>
<member>To encode entire script in a proprietary PHP application</member>
<member>To encode some classes and/or functions in a proprietary PHP application</member>
<member>
To enable the production of php-gtk applications that could be used on
client desktops, without the need for a php.exe.
</member>
<member>To do the feasibility study for a PHP to C converter</member>
</simplelist>
The first of these goals is achieved using the
<function>bcompiler_write_header</function>,
<function>bcompiler_write_file</function> and
<function>bcompiler_write_footer</function>
functions. The bytecode files can
be written as either uncompressed or plain.
To use the generated bytecode, you can simply include it
with include or require statements.
</para>
<para>
The second of these goals is achieved using the
<function>bcompiler_write_header</function>,
<function>bcompiler_write_class</function>,
<function>bcompiler_write_footer</function>,
<function>bcompiler_read</function>,
and <function>bcompiler_load</function> functions. The bytecode files can
be written as either uncompressed or plain. The
<function>bcompiler_load</function> reads a bzip compressed bytecode file,
which tends to be 1/3 of the size of the original file.
</para>
<para>
To create EXE type files, bcompiler has to be used with a modified sapi
file or a version of PHP which has been compiled as a shared library. In
this scenario, bcompiler reads the compressed bytecode from the end of the
exe file.
</para>
<para>
bcompiler can improve performance by about 30% when used with uncompressed
bytecodes only. But keep in mind that uncompressed bytecode can be up
to 5 times larger than the original source code. Using bytecode
compression can save your space, but decompression requires much more
time than parsing a source. bcompiler also does not do any bytecode
optimization, this could be added in the future...
</para>
<para>
In terms of code protection, it is safe to say that it would be impossible
to recreate the exact source code that it was built from, and without the
accompanying source code comments. It would effectively be useless to use
the bcompiler bytecodes to recreate and modify a class. However it is
possible to retrieve data from a bcompiled bytecode file - so don't put
your private passwords or anything in it.
</para>
</preface>
&reference.bcompiler.setup;
&reference.bcompiler.constants;
&reference.bcompiler.reference;
</book>
<!-- 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
sgml-parent-document:nil
sgml-default-dtd-file:"../../../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
-->

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<appendix xml:id="bcompiler.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.constants;
&no.constants;
</appendix>
<!-- 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
sgml-parent-document:nil
sgml-default-dtd-file:"../../../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
-->

View file

@ -1,89 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- Purpose: basic.php -->
<!-- Membership: pecl -->
<!-- State: experimental -->
<!-- $Revision: 1.8 $ -->
<reference xml:id="ref.bcompiler" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>PHP bytecode Compiler</title>
<titleabbrev>bcompiler</titleabbrev>
<reference xml:id="ref.bcompiler" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<titleabbrev>bcompiler &Functions;</titleabbrev>
<partintro>
<section xml:id="bcompiler.contact">
<title>Contact Information</title>
<para>
If you have comments, bugfixes, enhancements or want to help
developing this beast, you can drop me a mail at <link
xlink:href="mailto:alan_k@php.net">alan_k@php.net</link>. Any help is very
welcome.
</para>
</section>
</partintro>
<partintro>
<section xml:id="bcompiler.intro">
&reftitle.intro;
&warn.experimental;
<para>
Bcompiler was written for several reasons:
<simplelist>
<member>To encode entire script in a proprietary PHP application</member>
<member>To encode some classes and/or functions in a proprietary PHP application</member>
<member>
To enable the production of php-gtk applications that could be used on
client desktops, without the need for a php.exe.
</member>
<member>To do the feasibility study for a PHP to C converter</member>
</simplelist>
The first of these goals is achieved using the
<function>bcompiler_write_header</function>,
<function>bcompiler_write_file</function> and
<function>bcompiler_write_footer</function>
functions. The bytecode files can
be written as either uncompressed or plain.
To use the generated bytecode, you can simply include it
with include or require statements.
</para>
<para>
The second of these goals is achieved using the
<function>bcompiler_write_header</function>,
<function>bcompiler_write_class</function>,
<function>bcompiler_write_footer</function>,
<function>bcompiler_read</function>,
and <function>bcompiler_load</function> functions. The bytecode files can
be written as either uncompressed or plain. The
<function>bcompiler_load</function> reads a bzip compressed bytecode file,
which tends to be 1/3 of the size of the original file.
</para>
<para>
To create EXE type files, bcompiler has to be used with a modified sapi
file or a version of PHP which has been compiled as a shared library. In
this scenario, bcompiler reads the compressed bytecode from the end of the
exe file.
</para>
<para>
bcompiler can improve performance by about 30% when used with uncompressed
bytecodes only. But keep in mind that uncompressed bytecode can be up
to 5 times larger than the original source code. Using bytecode
compression can save your space, but decompression requires much more
time than parsing a source. bcompiler also does not do any bytecode
optimization, this could be added in the future...
</para>
<para>
In terms of code protection, it is safe to say that it would be impossible
to recreate the exact source code that it was built from, and without the
accompanying source code comments. It would effectively be useless to use
the bcompiler bytecodes to recreate and modify a class. However it is
possible to retrieve data from a bcompiled bytecode file - so don't put
your private passwords or anything in it.
</para>
</section>
&reference.bcompiler.entities.functions;
&reference.bcompiler.configure;
</reference>
<section xml:id="bcompiler.contact">
<title>Contact Information</title>
<para>
If you have comments, bugfixes, enhancements or want to help
developing this beast, you can drop me a mail at <link
xlink:href="mailto:alan_k@php.net">alan_k@php.net</link>. Any help is very
welcome.
</para>
</section>
</partintro>
&reference.bcompiler.entities.functions;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@ -103,3 +38,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<chapter xml:id="bcompiler.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;
<section xml:id="bcompiler.requirements">
&reftitle.required;
&no.requirement;
</section>
&reference.bcompiler.configure;
<section xml:id="bcompiler.configuration">
&reftitle.runtime;
&no.config;
</section>
<section xml:id="bcompiler.resources">
&reftitle.resources;
&no.resource;
</section>
</chapter>
<!-- 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
sgml-parent-document:nil
sgml-default-dtd-file:"../../../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
-->