" syntax in PHP? What is the correct name for the arrow syntax in PHP used when referencing an object, for exam...">

What is the correct term for the "->" syntax in PHP?

What is the correct name for the arrow syntax in PHP used when referencing an object, for example

$this->value = "test"; 

What is called "->"? One of these terms is "really difficult for Google."

+4
source share
4 answers

T_OBJECT_OPERATOR

... but everyone calls him an arrow.


Hint: run this in the PHP CLI: ->;

Extra credit: now what is called :: ?

+4
source

Good question. "->" is called the arrow operator.

References: http://ch2.php.net/manual/en/language.oop5.static.php

+1
source

As far as I know, it is called a single arrow operator, whereas => is a double arrow operator!

+1
source

Dynamic data access operator (->) static data access operator (: :)

0
source

Source: https://habr.com/ru/post/1401516/


All Articles