|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57492 bcompiler not extending good
Submitted: 2007-01-24 13:13 UTC Modified: 2009-11-30 07:29 UTC
From: dudubs at nana dot co dot il Assigned: val (profile)
Status: Closed Package: bcompiler (PECL)
PHP Version: 5.0.0 OS: WinXP Pro
Private report: No CVE-ID: None
 [2007-01-24 13:13 UTC] dudubs at nana dot co dot il
I job with bcompiler for compile classes these extends class extends class

Reproduce code:
// file 'Classes.php'
class OutputClass {
	function WriteString($str) {
		echo $str;
// file 'Code.php'
class FontClass extends OutputClass {
	function FontAndWrite($str) {
		parent::WriteString("<font color=red>$str</font>");

class StyleClass extends FontClass {
	function StyleAndFont($str) {

// file Compiling.php
$h = fopen('Code.phb', 'w');
bcompiler_write_file($h, 'Code.php');

// file Loading.php

StyleClass::StyleAndFont('My Text');
!!!!! Fatal error: Call to undefined method OutputClass::fontandwrite() in ...

I first run Compiling.php and after Loading.php

Expected result:
!!!!! Fatal error: Call to undefined method OutputClass::fontandwrite() in ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-18 02:20 UTC] danhen at web dot de
This only happens when there is a class which extends another  in the same source file. Following 'one class per file' paradigm could be a workaround.
 [2009-11-23 12:56 UTC]
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

The current CVS version (0.9.1) doesn't have this bug. Tested with PHP 5.2.11-dev and 5.3.1-dev.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 11:01:30 2024 UTC