bcompiler_load_exe

(PECL bcompiler >= 0.4) Reads and creates classes from a bcompiler exe file bool bcompiler_load_exe ( string $filename ) Reads data from a bcompiler exe file and creates classes from the bytecodes. Parameters: filename The exe file path, as a string. Returns: Returns TRUE on success or FALSE on failure.

bcompiler_load

(PECL bcompiler >= 0.4) Reads and creates classes from a bz compressed file bool bcompiler_load ( string $filename ) Reads data from a bzcompressed file and creates classes from the bytecodes. Parameters: filename The bzcompressed file path, as a string. Returns: Returns TRUE on success or FALSE on failure.

bcompiler_parse_class

(PECL bcompiler >= 0.4) Reads the bytecodes of a class and calls back to a user function bool bcompiler_parse_class ( string $class, string $callback ) Reads the bytecodes of a class and calls back to a user function. Parameters: class The class name, as a string. callback The class name, as a string. Returns:

bcompiler_read

(PECL bcompiler >= 0.4) Reads and creates classes from a filehandle bool bcompiler_read ( resource $filehandle ) Reads data from a open file handle and creates classes from the bytecodes. Parameters: filehandle A file handle as returned by fopen(). Returns: Returns TRUE on success or FALSE on failure. Notes

bcompiler_write_class

(PECL bcompiler >= 0.4) Writes a defined class as bytecodes bool bcompiler_write_class ( resource $filehandle, string $className [, string $extends ] ) Reads the bytecodes from PHP for an existing class, and writes them to the open file handle. Parameters: filehandle A file handle as returned by fopen(). className The class name, as

bcompiler_write_constant

(PECL bcompiler >= 0.5) Writes a defined constant as bytecodes bool bcompiler_write_constant ( resource $filehandle, string $constantName ) Reads the bytecodes from PHP for an existing constant, and writes them to the open file handle. Parameters: filehandle A file handle as returned by fopen(). constantName The name of the defined c

bcompiler_write_exe_footer

(PECL bcompiler >= 0.4) Writes the start pos, and sig to the end of a exe type file bool bcompiler_write_exe_footer ( resource $filehandle, int $startpos ) An EXE (or self executable) file consists of 3 parts: The stub (executable code, e.g. a compiled C program) that loads PHP interpreter, bcompiler extension, stored Bytecodes and initiates a call for the specified function (e.g. main) or class method (e.g. main::main)

bcompiler_write_file

(PECL bcompiler >= 0.6) Writes a php source file as bytecodes bool bcompiler_write_file ( resource $filehandle, string $filename ) This function compiles specified source file into bytecodes, and writes them to the open file handle. Parameters: filehandle A file handle as returned by fopen(). filename The source file path, as a strin

bcompiler_write_footer

(PECL bcompiler >= 0.4) Writes the single character \x00 to indicate End of compiled data bool bcompiler_write_footer ( resource $filehandle ) Writes the single character \x00 to indicate End of compiled data. Parameters: filehandle A file handle as returned by fopen(). Returns: Returns TRUE on success or FALSE on failure.

bcompiler_write_function

(PECL bcompiler >= 0.5) Writes a defined function as bytecodes bool bcompiler_write_function ( resource $filehandle, string $functionName ) Reads the bytecodes from PHP for an existing function, and writes them to the open file handle. Order is not important, (eg. if function b uses function a, and you compile it like the example below, it will work perfectly OK). Parameters: fileh