|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-02-07 18:10 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
Description: ------------ Compiling using bcompiler will somehow include a list of all functions that are defined at the time of calling bcompiler_write_file(). If X() is defined in the compilation script itself, the resulting program has a problem defining function X() or calling function_exists("X") as a zero sized reply is returned. Reproduce code: --------------- compile script: ... function file_put_contents($filename, $data, $flags = 0, $f = FALSE) {...} ... if (!bcompiler_write_header($fh)) echo "error writing header for: ".$filename."\n"; if (!bcompiler_write_file($fh, $tmpFilename)) echo "error compiling file ".$filename."\n"; if (!bcompiler_write_footer($fh)) echo "error writing footer for: ".$filename."\n"; ... resulting compiled file: function file_put_contents($filename, $data, $flags = 0, $f = FALSE) {...} //THIS LEADS TO A ZERO SIZE REPLY //Under some not known circumstances an error message is shown that file_put_contents cannot be redeclared. // PHP version used was <5.0.0 so this function was *not* defined by the PHP environment itself Expected result: ---------------- The compiled file should accept the new function and continue normally. Actual result: -------------- Fatal error: Cannot redeclare file_put_contents() (previously declared in /tmp/myfile.php:48) in /tmp/myfile.php on line 48 It can easily be seen that this is the same file and the same line number. If the function file_put_contents() had been renamed in the script we use for compilation it works fine.