php.net |  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
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:
MUST BE VALID
Solve the problem:
10 + 3 = ?
Subscribe to this entry?

 
 [2010-02-01 20:52 UTC] alecgorge at gmail dot com
Description:
------------
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:
---------------
<?php
class Foo {

}
?>

Expected result:
----------------
Nothing

Actual result:
--------------
&#9658;

Patches

Pull Requests

History

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

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

<?php
$fhandle = fopen('test.phb', 'w');   // here comes the bytecode file name
bcompiler_write_header($fhandle);
bcompiler_write_file($fhandle, 'test.php'); // here comes the source file name
bcompiler_write_footer($fhandle);
fclose($fhandle);
?>
 [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: Fri Dec 13 03:01:28 2024 UTC