Skip to content
This repository has been archived by the owner on Feb 16, 2018. It is now read-only.

Bad bytecode? #2

Open
IngwiePhoenix opened this issue Sep 13, 2013 · 0 comments
Open

Bad bytecode? #2

IngwiePhoenix opened this issue Sep 13, 2013 · 0 comments

Comments

@IngwiePhoenix
Copy link

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:

<?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

Any suggestions?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant