|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59058 Any sort of class definition causes the compiled file not to run
Submitted: 2010-02-01 20:52 UTC Modified: 2010-02-04 19:01 UTC
From: alecgorge at gmail dot com Assigned:
Status: Closed Package: bcompiler (PECL)
PHP Version: 5.3.1 OS: Windows 7 64-bit
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
28 + 25 = ?
Subscribe to this entry?

 [2010-02-01 20:52 UTC] alecgorge at gmail dot com
I am using bcompiler v 0.9.2 and any sort of class definition causes the file not to run and have it output a strange symbol. Adding methods to the class doesn't help. This also occurred on v0.9.1. I am using PHP 5.3.1.

Reproduce code:
class Foo {


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-01 20:54 UTC] alecgorge at gmail dot com
I am creating the bcompiled file using:

$fhandle = fopen('test.php', 'w');
bcompiler_write_file($fhandle, 'test.phb');
 [2010-02-02 06:02 UTC]
If the source file is test.php, and bytecodes are to be written to test.phb, you need to use it as follows:

$fhandle = fopen('test.phb', 'w');   // here comes the bytecode file name
bcompiler_write_file($fhandle, 'test.php'); // here comes the source file name
 [2010-02-04 19:01 UTC] alecgorge at gmail dot com
In my application, I was trying to write to the same file as the source file.

You can close this bug.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 09:01:27 2024 UTC