Re: [PHP-DEV] Unexpected behavior of $this->$propertyName[...]

2009-01-15 Thread Etienne Kneuss
Hello, On Thu, Jan 15, 2009 at 8:24 PM, Robert Lemke wrote: > Dear internals, > > please consider the following code executed with PHP 5.3alpha3: > > class Foo { >protected $foo = array('bar' => 'baz'); > >public function test() { >$propertyName = 'foo'; >

Re: [PHP-DEV] Unexpected behavior of $this->$propertyName[...]

2009-01-15 Thread Robert Lemke
Hi Paul, Am 15.01.2009 um 20:35 schrieb Paul Biggar: I suspect neither bug nor feature. I think you expect that $this->$propertyName['bar'] is the same as: ($this->$propertyName)['bar'] but in fact it is: $this->($propertyName['bar']) So in your example, 'bar' is the string index 0

Re: [PHP-DEV] Unexpected behavior of $this->$propertyName[...]

2009-01-15 Thread Paul Biggar
On Thu, Jan 15, 2009 at 7:24 PM, Robert Lemke wrote: > Dear internals, > > please consider the following code executed with PHP 5.3alpha3: I suspect neither bug nor feature. I think you expect that $this->$propertyName['bar'] is the same as: ($this->$propertyName)['bar'] but in fact it