From: Operating system: Ubuntu 11.10 PHP version: 5.3.10 Package: Performance problem Bug Type: Bug Bug description:Incorrectly reports function as being redeclared
Description: ------------ I have created a web page which includes files config.php and functions.php. I define basic constants in config.php while the file "functions.php" is used to define functions. You can reproduce a problem if you create a page, include first "config.php" then "functions.php" and just invoke this page from a web browser. My configure line is as follows: './configure' '--prefix=/soft/programs/php' '--with-apxs2=/soft/programs/apache/bin/apxs' '--with-config-file-path=/soft/programs/php/ini' '--with-config-file-scan-dir=/soft/programs/php/additional' '--with-zlib=shared,/soft/programs/zlib' '--with-bz2=shared,/soft/programs/bzip' '--with-curl=shared,/soft/programs/curl' '--with-gd=shared,/soft/programs/gd' '--with-jpeg-dir=/soft/programs/jpeg' '--with-png-dir=/soft/programs/libpng' '--with-freetype-dir=/soft/programs/freetype' '--with-gettext=shared,/soft/programs/gettext' '--with-mysql=shared,/soft/programs/mysql' '--with-mcrypt=shared,/soft/programs/libmcrypt' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-calendar' '--enable-mbstring' '--with-libexpat-dir=/soft/programs/expat' '--with-libxml-dir=/soft/programs/libxml' '--with-xsl=shared,/soft/programs/libxslt' '--enable-zip' Test script: --------------- You'll find test script here: http://www.kreine.ru/test/test-script.php Expected result: ---------------- Normal script execution without any fatal error. Actual result: -------------- Fatal error: Cannot redeclare get_tree() (previously declared in ...) in /test/functions.php on line 16 -- Edit bug report at https://bugs.php.net/bug.php?id=61151&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61151&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61151&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61151&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61151&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61151&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61151&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61151&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61151&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61151&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61151&r=support Expected behavior: https://bugs.php.net/fix.php?id=61151&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61151&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61151&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61151&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61151&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=61151&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61151&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61151&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61151&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61151&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61151&r=mysqlcfg