note 10720 added to Classes and Objects

From: Date: Thu, 18 Jan 2001 21:51:51 +0000
Subject: note 10720 added to Classes and Objects
Groups: php.notes 
Request: Send a blank email to php-notes+get-9940@lists.php.net to get a copy of this message
In response to the Editor's note to the note dated 01-Nov-2000 from eggbird@bigfoot.com: Yes, there is an inherent ambiguity when resolving $var->foo->bar. The reason other languages can support resolving such constructs, however, is that they define an associativity and precedence to the -> operator as part of the language, just as one defines an associativity and precedence for inherently ambiguous operators like "+", "*", and "%". To the language designers: stop ducking the problem by stating there's an ambiguity - resolve the ambiguity by specification. Improve the language. My vote? Do the sensible thing and have $member->foo->bar resolve to "the bar member of the object given by the foo member of the object referenced by $member". http://www.php.net/manual/en/language.oop.php

« previous php.notes (#9940) next »