Using this construction, which is perfectly valid in PHP: <?php class A implements \ArrayAccess { public $values = []; public function setTest() { $this['test'] = 'test'; } public function offsetGet($offset) { return $this->values[$offset]; } public function offsetSet($offset, $value) { $this->values[$offset] = $value; } public function offsetExists($offset) { return array_key_exists($offset, $this->values); } public function offsetUnset($offset) { unset($this->values[$offset]); } } $test = new A; $test->setTest(); echo $test['test']; there will be a red background for the line $this['test'] = 'test', saying "Cannot re-assign $this". But that is in fact possible due to $this being an instance of class implementing the ArrayAccess interface, thus allowing it to be accessed as array. Please look in to this, many frameworks use this kind of access heavily for forms, components etc. and it is very distracting. Thanks and have a nice day!
*** This bug has been marked as a duplicate of bug 346876 ***