|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59055 bcompiler can't parse abstract classes
Submitted: 2010-02-01 11:07 UTC Modified: 2010-02-01 15:02 UTC
From: bugs at bilke dot org Assigned:
Status: Wont fix Package: bcompiler (PECL)
PHP Version: 5.2.10 OS: Ubuntu 9.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: bugs at bilke dot org
New email:
PHP Version: OS:


 [2010-02-01 11:07 UTC] bugs at bilke dot org
I use the bcompiler_compile.php script which is available in the bcompiler documentation. With this script it's not possible to combile an abstract class.

The compilation of this code below will fail with an error.

Reproduce code:
abstract class MyClass {
abstract public function myFunc();

Actual result:
Fatal error: Class MyClass contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (MyClass::myFunc) in /usr/share/php/PEAR/bcompiler/examples/bcompiler_compile.php(168) : eval()'d code on line 3


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-01 15:02 UTC]
bcompiler_compile.php become outdated with the recent development of the extension. I'll remove it from the repository. Would suggest using a simpler compile script, like:

function compile($sname, $tname = '') {
  if ($tname == '') $tname = preg_replace("!\.php!", ".phb", $sname);
  echo " * source file: $sname\n * target file: $tname\n";
  $f = fopen($tname, "w");
  bcompiler_write_file($f, $sname);
  echo " > compiled\n";

for ($i = 1; $i < $_SERVER['argc']; $i++) {
  $sname = $_SERVER['argv'][$i];
  compile($sname, '');
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 10:01:29 2024 UTC