#23576 [Opn]: Parameters in Constuktor

From: Date: Sun, 11 May 2003 11:47:37 +0000
Subject: #23576 [Opn]: Parameters in Constuktor
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39440@lists.php.net to get a copy of this message
ID: 23576 User updated by: php at sl5 dot de Reported By: php at sl5 dot de Status: Open Bug Type: Class/Object related Operating System: Windows 2000 PHP Version: 4.3.2RC1 New Comment: No BUG ! My fault ! I wrote $this->$iFrameName ; Correct is: $this->iFrameName ; Sorry, Best regards Sebastian Previous Comments: ------------------------------------------------------------------------ [2003-05-10 16:38:19] php at sl5 dot de I defined a class with conctructor and other functions. <pre> class html_edit{ var $iFrameName; var $jsPath; function html_edit( $name , $jspath , $sitepath ){ $this->$iFrameName = $name; echo $this->$iFrameName.'<br>'; $this->$jsPath = $jspath ; echo $this->$iFrameName; # etc ...</pre> If I built a instance the sendet parameters are not correct in the construktor. For e.g.: $e_obj = new html_edit( 'framechen' , '/LCiP/edit-site/' , '/LCiP/edit-site/' ); The Echo commands in the construktor schows: "framechen" then "/LCiP/edit-site/" . First ist correct, second is wrong. Second echo should be also "framechen". Greetings Sebastian ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23576&edit=1

« previous php.bugs (#39440) next »