Bug #13703 Updated: PHP allows function redefinition

From: Date: Tue, 26 Mar 2002 08:30:30 +0000
Subject: Bug #13703 Updated: PHP allows function redefinition
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-3358@lists.php.net to get a copy of this message
ID: 13703 Updated by: derick@php.net Reported By: yasuo_ohgaki@yahoo.com -Status: Critical +Status: Closed Bug Type: Scripting Engine problem Operating System: linux 2.4.4/glibc 2.2.2 -PHP Version: 4.0CVS-2001-10-16 +PHP Version: 4.0CVS-2001-10-1 New Comment: Fixed in CVS. Fix will be in PHP 4.2.0. Derick Previous Comments: ------------------------------------------------------------------------ [2001-11-11 22:07:09] yasuo_ohgaki@yahoo.com Tested with CGI bin, I got 4.0.6: "Another A->test()" 4.0.4pl1: "Another A->test()" When I got both functions executed, memory is broken by some code. (I have no idea what's the cause of broken memory) [yohgaki@dev php-4.0.6]$ ./php ~/public_html/bugs/13703/test.php X-Powered-By: PHP/4.0.6 Content-type: text/html Another A->test() [yohgaki@dev php-4.0.6]$ cat config.nice #! /bin/sh # # Created by configure "./configure" \ "--without-mysql" \ "--without-pear" \ "--enable-debug" \ "$@" [yohgaki@dev php-4.0.6]$ [yohgaki@dev php-4.0.4pl1]$ ./php ~/public_html/bugs/13703/test.php Content-type: text/html; charset=EUC-JP Another A->test() [yohgaki@dev php-4.0.4pl1]$ ------------------------------------------------------------------------ [2001-11-11 21:45:05] cnewbill@php.net Ditto with 4.0.6. -Chris ------------------------------------------------------------------------ [2001-11-11 21:30:16] sniper@php.net Marking as Critical for now. ------------------------------------------------------------------------ [2001-11-11 21:29:55] sniper@php.net I get "Another A->test()" with latest CVS. Anyone got older (4.0.6) to test this with? --Jani ------------------------------------------------------------------------ [2001-10-17 03:37:04] yasuo_ohgaki@yahoo.com I get only "A->test()" which is the first function definition. I'm not suprised. When I notice this bug in much complex scripts that have relatively complex class strucutre, PHP executed both functions that have the same name. (without error/warning) Does this bug's behaviour depend on configuration? If anyone need configure line, let me know. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/13703 -- Edit this bug report at http://bugs.php.net/?id=13703&edit=1

« previous php.bugs (#3358) next »