|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-16 02:09 UTC] alan at akbkhome dot com
[2010-04-16 02:10 UTC] alan at akbkhome dot com
[2010-04-16 07:44 UTC] alecgorge at gmail dot com
[2010-04-16 11:17 UTC] val@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 02:00:01 2025 UTC |
Description: ------------ If you try bcompiling a file that has the same function or class names, it gives you a fatal error about redeclaring functions. I cannot think of a reason this should happen, but if I am missing one, tell me! Reproduce code: --------------- <?php // bcompile.php // move to right dir when running in CLI chdir(dirname(__FILE__)); function bcompileFile ($file) { $fhandle = fopen('temp.txt', 'w'); bcompiler_write_header($fhandle); bcompiler_write_file($fhandle, $file); bcompiler_write_footer($fhandle); fclose($fhandle); } bcompileFile('bcompile.php'); ?> Expected result: ---------------- no output and temp.txt containing the bcompiled file Actual result: -------------- H:\bcompiler\php>php -f H:\bcompiler\bcompile.php Fatal error: Cannot redeclare bcompileFile() (previously declared in H:\bcompiler\bcompile.php:7) in H:\bcompiler\bcompile.php on line 13