$this->$string[char] bug?

From: Date: Tue, 06 Jun 2000 06:04:30 +0000
Subject: $this->$string[char] bug?
Groups: php.general 
Request: Send a blank email to php-general+get-1114@lists.php.net to get a copy of this message
I think I found a bug in PHP. You cannot access the invidual characters of a string if it is a class member variable using the $this pointer. I was unable to find a syntax that would make it work. It does not seem to be documented anywhere. Example: class Foo { var $blah = "stuff"; function Foo() { echo $this->$blah[0]; // this will NOT work $str = $this->$blah; echo $str[0]; // this works } } -- David Phillips <david@acz.org> http://www.acz.org/ _____________________________________________ NetZero - Defenders of the Free World Click here for FREE Internet Access and Email http://www.netzero.net/download/index.html

« previous php.general (#1114) next »