Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the name of '->' in PHP? [duplicate]

Tags:

php

Whenenever I'm discussing PHP with colleagues I don't know how to describe the little arrow symbol '->' used for accessing properties and methods in PHP. Does it have a name? Is it called arrow?

like image 438
David Ball Avatar asked Feb 02 '12 12:02

David Ball


People also ask

What is -> symbol called?

The arrow operator is formed by using a minus sign, followed by the greater than symbol as shown below.

What is the name of -> in PHP?

It's called the object operator (T_OBJECT_OPERATOR).

How to use DUPLICATE in mysql?

Find duplicate values in one column First, use the GROUP BY clause to group all rows by the target column, which is the column that you want to check duplicate. Then, use the COUNT() function in the HAVING clause to check if any group have more than 1 element. These groups are duplicate.

How to check DUPLICATE values in mysql using php?

Following is the query to count duplicate records with first_name and last_name in a table. mysql> SELECT COUNT(*) as repetitions, last_name, first_name -> FROM person_tbl -> GROUP BY last_name, first_name -> HAVING repetitions > 1; This query will return a list of all the duplicate records in the person_tbl table.


2 Answers

I mostly call it object access operator.

EDIT: Actually, come to think of it; I usually pronounce it as "dot", since most of us here are more familiar with the dot-notation for accessing objects properties. Since it's clearly not a dot, that's probably not the answer you were looking for.

like image 67
rael_kid Avatar answered Oct 15 '22 20:10

rael_kid


Chaining operator, read here: http://en.wikipedia.org/wiki/Method_chaining

like image 36
tim Avatar answered Oct 15 '22 19:10

tim