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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alecgorge at gmail dot com
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Sat Apr 20 03:01:28 2024 UTC