|  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
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
31 - 24 = ?
Subscribe to this entry?

 [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-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 08 04:01:27 2023 UTC