|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-02-01 11:07 UTC] bugs at bilke dot org
Description:
------------
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:
---------------
<?php
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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 06:00:01 2025 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: <php function compile($sname, $tname = '') { if ($tname == '') $tname = preg_replace("!\.php!", ".phb", $sname); echo " * source file: $sname\n * target file: $tname\n"; ob_end_flush(); $f = fopen($tname, "w"); bcompiler_write_header($f); bcompiler_write_file($f, $sname); bcompiler_write_footer($f); fclose($f); echo " > compiled\n"; } for ($i = 1; $i < $_SERVER['argc']; $i++) { $sname = $_SERVER['argv'][$i]; compile($sname, ''); } ?>