So at some magical point, bcompiler finally did compile and work :)
Now however, I have a different issue. The bytecode compiled on one mashine doesnt work on the same mashine. Like, I did this:
<?php
echo "Compiling.\n";
$fh = fopen("hello.phb", "w");
bcompiler_write_header($fh);
bcompiler_write_file($fh, "hello.php");
bcompiler_write_footer($fh);
fclose($fh);
echo "Now including hello.php:\n";
include "hello.php";
echo "Now including hello.phb:\n";
include "hello.phb";
?>
The compile target is:
<?php
echo "Hello world! I am compiled.\n";
?>
And when I run php compile.php, this come sout:
Kevins-MacBook-Air:compile Ingwie$ php compile.php
Compiling.
Now including hello.php:
Hello world! I am compiled.
Now including hello.phb:
Warning: bcompiler: Bad bytecode file format at 00000129 in /Users/Ingwie/Work/compile/compile.php on line 13
Hey!
So at some magical point, bcompiler finally did compile and work :)
Now however, I have a different issue. The bytecode compiled on one mashine doesnt work on the same mashine. Like, I did this:
The compile target is:
And when I run
php compile.php
, this come sout:Any suggestions?