note 57063 added to language.functions

From: Date: Thu, 22 Sep 2005 15:36:01 +0000
Subject: note 57063 added to language.functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-95614@lists.php.net to get a copy of this message
It seems that one does not always get a complaint about having redefined a function--sometimes one gets very bizarre behavior instead! I defined a function in an include-file some time ago, and then forgot I'd consumed its identifier. So yesterday I defined another function in a different include-file using the same name. It accidently worked okay until this morning, when I tried to execute a program on localhost that included both those files. I still don't understand what it thought it was doing, but it appeared to imagine I wanted to go to some completely unreasonable site out on the net. It was such a bizarre error and so apparently unconnected with anything I intended to do that it took me a long time to track it down to having re-used the same function identifier in two different includes. Once I uniquely renamed one of the functions, everything started working as expected. The problem bothered both 4.3.4 and 4.4.0, running as Apache modules under W2K. ---- Manual Page -- http://www.php.net/manual/en/language.functions.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57063 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57063&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57063&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57063&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57063&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57063&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57063&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57063&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57063&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95614) next »