Compiling PHP
I didn’t realize that there was a project underway to allow developers to compile their PHP code, but I’m glad to hear of it.
Compiling your first script
This script takes a source PHP script called in.php, and outputs a compiled PHP script called out.php<?php
$fp = fopen(”out.php”, “w”); // Create the destination PHP file (in this case called out.php)
bcompiler_write_header($fp); // Write a bcompiler header in the destination file
bcompiler_write_file($fp, “in.php”); // Compile the contents of the source file and place in destination file
bcompiler_write_footer($fp); // Write the bcompiler footer in the destination file
fclose($fp); // Close the destination file
?>