Bug #18013 Updated: Local variable losing value

From: Date: Thu, 27 Jun 2002 09:52:35 +0000
Subject: Bug #18013 Updated: Local variable losing value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12218@lists.php.net to get a copy of this message
ID: 18013 Updated by: sander@php.net Reported By: miguel@ipatimup.pt -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Linux 2.2.16 - Suse 7.x PHP Version: 4.2.1 New Comment: Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. There are no pointers in PHP, but in some cases references will do. Previous Comments: ------------------------------------------------------------------------ [2002-06-27 05:20:55] miguel@ipatimup.pt This is a big snip of the code: $temp_file_path="/temp/x/1234.IMG.gz"; $interfile_final_path="/temp/1234.IMG.gz"; printf("<P>BEFORE:temp_file_path=%s<BR>interfile_final_path=%s</P>", $temp_file_path,$interfile_final_path ); $file_name = $interf->getFileName(); printf("<P>AFTER:temp_file_path=%s<BR>interfile_final_path=%s</P>", $temp_file_path,$interfile_final_path ): Object $interf, is a class created by me. The method getFileName() of the class is implemented like this: function getFileName() { $aux = $this->_getFileName(); //print "aux= $aux<BR>"; $ret = basename( $aux, ".IMG.gz" ); //print "ret=$ret<BR>"; return $ret; } My problem is that var $temp_file_path after a call to method getFileName, gets the value returned by getFileName Is there any way of knowing the address( pointer like ) of a variable? My configure line: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-pgsql' '--with-oci8=/usr/local/oracle' '--with-oracle=/usr/local/oracle' '--with-debug' Also, ftp functions are active. If any adicional information is needed please let me know. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18013&edit=1

« previous php.bugs (#12218) next »