About symbol " -> " in php | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

About symbol " -> " in php

I don't understand exact meaning of symbol " -> " please anyone help me to clear about it. What is the exact meaning of this symbol in php.

12th Jun 2018, 1:36 AM
Satish Kumar Sharma
Satish Kumar Sharma - avatar
3 Respostas
+ 5
Since PHP uses the dotĀ .Ā as a concatenation operator, it uses the arrowĀ ->Ā where most other languages would use a dot to access a property or method of an object. Itā€™s technically called the ā€œobject operatorā€ but most people call it the arrow (or ā€œarrow operatorā€ or, following JavaScript, the ā€œsingle-arrow operatorā€).
12th Jun 2018, 4:30 AM
Alexander Sokolov
Alexander Sokolov - avatar
0
Alexander Sokolov damn good explanation.
12th Jun 2018, 6:10 AM
Lexfuturorum
Lexfuturorum - avatar
0
"->:" its actual name is "object operator". In 2008 in an opensource linux meet conducted in Hyderabad we proposed a name as "calls". So that while writing code we can pronounce $class calls object/property etc. For eg, $class->abc() can be pronounced as $class calls abc(). Ever since we are using that name(calls) unofficially.
14th Mar 2024, 9:14 PM
nisa chara
nisa chara - avatar