You are here: Re: new Object()->function() ? « PHP Programming Language « IT news, forums, messages
Re: new Object()->function() ?

Posted by Mtr on 10/02/07 15:20

On Tue, 02 Oct 2007 17:07:10 +0200, Michael Fesser <netizen@gmx.de> wrote:

>The object is dereferenced. From the manual:
>
>| An operator is something that you feed with one or more values (or
>| expressions, in programming jargon) which yields another value (so
>| that the construction itself becomes an expression).

quoting the manual can only try to indicate what the authors of PHP say.
That is not any proof that it really is an operator. If they say that the
sun is blue, would you believe that, too?

The fact is that no operation is being performed, and so "->" is not an
operator in the conventioned use of the term.

In another language, Object.property would not indicate that the dot is an
operator of any kind. The author(s) of PHP shot themselves in the foot
early on when they decided to use the the dot for string concatenation
rather than the same plus sign that nearly everybody else uses. So now they
have to use the clunky '->' where they should be using a dot. It still just
denotes that a method or variable belongs to the object.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация