#46648 [NEW]: Cannot redeclare declared function

From: Date: Sat, 22 Nov 2008 22:48:54 +0000
Subject: #46648 [NEW]: Cannot redeclare declared function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131212@lists.php.net to get a copy of this message
From: satovey at yahoo dot com Operating system: Win98 PHP version: 5.2.6 PHP Bug Type: Unknown/Other Function Bug description: Cannot redeclare declared function Description: ------------ PHP seems to think that a function is redeclared. 1) This is the first function declared. 2) This is not occurring with any other declared functions. 3) This error occurs even when the entire function is placed on a single line. 4) The error occurs on this function call whether it is in the given file or inside an include file. Reproduce code: --------------- This is the system Win98 running the following. Apache Version Apache/2.2.9 (Win32) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8h mod_autoindex_color PHP/5.2.6 xampp version Version 1.6.7 Here is the error message. Fatal error: Cannot redeclare getadminmodules() (previously declared in C:\xampp\htdocs\oldwebsite\YevotasSite\YevotasSite.php:26) in C:\xampp\htdocs\oldwebsite\YevotasSite\YevotasSite.php on line 26 Code for line 26 is as follows: function getadminmodules(){} Expected result: ---------------- The syntax is correct and therefore no errors are expected. Actual result: -------------- Fatal error occurs. -- Edit bug report at http://bugs.php.net/?id=46648&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46648&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46648&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46648&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46648&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46648&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46648&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46648&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46648&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46648&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46648&r=support Expected behavior: http://bugs.php.net/fix.php?id=46648&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46648&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46648&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46648&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46648&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46648&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46648&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46648&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46648&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46648&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46648&r=mysqlcfg

« previous php.bugs (#131212) next »