From 43ae92eaedab2a5ea74b94121bb7dfe93770deed Mon Sep 17 00:00:00 2001 From: val khokhlov Date: Sun, 2 Jan 2005 16:09:14 +0000 Subject: [PATCH] update package description git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@176304 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/bcompiler/reference.xml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/reference/bcompiler/reference.xml b/reference/bcompiler/reference.xml index d0521c7d0e..433cdbcd03 100644 --- a/reference/bcompiler/reference.xml +++ b/reference/bcompiler/reference.xml @@ -1,5 +1,5 @@ - + PHP bytecode Compiler bcompiler @@ -11,7 +11,8 @@ Bcompiler was written for two reasons: - To encode some classes in a proprietary PHP application + To encode entire script in a proprietary PHP application + To encode some classes and/or functions in a proprietary PHP application To enable the production of php-gtk applications that could be used on client desktops, without the need for a php.exe. @@ -20,6 +21,16 @@ The first of these goals is achieved using the bcompiler_write_header, + bcompiler_write_file and + bcompiler_write_footer + 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. + + + The second of these goals is achieved using the + bcompiler_write_header, bcompiler_write_class, bcompiler_write_footer, bcompiler_read, @@ -35,10 +46,12 @@ exe file. - bcompiler is unlikely to improve performance very much, as it only - bypasses the compiler stage of the PHP running process and replaces it - with the import process in bcompiler. It also does not do any bytecode - optimization, this could be added in the future. + 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... In terms of code protection, it is safe to say that it would be impossible