Home > PHP > Function > bcompiler > bcompiler_write_function()

bcompiler_write_function()

bcompiler_write_function - Writes an defined function as bytecodes

Syntax

bool bcompiler_write_function (resource $filehandle, string $functionName)

Arguments

  • filehandle - A file handle as returned by fopen().
  • functionName - The function name, as a string.

Description

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).

Version

PHP PECL bcompiler >= 0.5

Return value

Returns TRUE on success or FALSE on failure.