views:

146

answers:

8
$class->method()
      ^
      |

what's the correct terminology for this? thanks guys!

+1  A: 

I believe that's called the "arrow notation", assuming of course you are talking about PHP. Thats what most publications, articles and the PHP website call it, so that's what my brain says on sight.

karim79
+5  A: 

I've always called the symbol an "arrow".

Matthew Jones
A: 

i would say: dereference operator

see: http://en.wikipedia.org/wiki/Dereference%5Foperator

after some discussions with good commenters, the final terminology could be:

dereference and field access operator that could be shorten into: - field access operator

dweeves
dereference is different, it provides the address that the pointer points to, not access to the underlying object
Chris Thompson
That's the * operator...
Guffa
see the java example where . is the derefence operator
dweeves
Not really. If anything it would be the "access member operator" as in t's usually used as syntactic sugar to access members of a pointer, as in C/C++(That is it's a dereference operator + a field access operator) or is simply the default way to access a field, as in perl.
Falaina
agree, the php -> is a dereference+field access operator !
dweeves
A: 

It's the "member selection" operator or "member by pointer" operator.

MSDN Library: C++ operators
Wikipedia: C++ opreators

Guffa
+1  A: 

Member access operator.

Pavel Minaev
This one sounds most 'correct' to me if, as it looks like, we're talking PHP.
thomasrutter
+1  A: 

Depends on the language:

-PHP, I believe its just used to access a class members

-C or C++ on the other hand, it is used to derefernce a pointer and access a member. It's pretty much just syntactic sugar.

pointer->member

is equivalent to

(*pointer).member
ACBurk
+1  A: 

I think C++ calls it “pointer member access operator.“

Philipp
A: 

In PHP it is called the T_OBJECT_OPERATOR. See the List of Parser Tokens in the PHP Manual.

Gordon