On Tue, May 9, 2006 4:48 pm, D. Dante Lorenso wrote: > If > the search for my constant follows the search I've listed above, self > would never be necessary unless you wanted to pinpoint "3" directly. > Under this same line of thinking, though, '$this->' really shouldn't > be > be necessary either unless you wanted to clarify local vs this for > same-named variables.
Languages that let you get away without specifying $this-> and self:: do exist... But, in my experience, after a certain level of complexity is achieved, you end up getting very confused very fast about where $foo is coming from... And it turns into a real nightmare when you inherit somebody else's code: 100,000 lines of code here echo $foo; 100,000 lines of code here You really have no idea where $foo came from, do you? :-) So I personally PREFER that one has to make it clear where the variables are coming from. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php