-1
$this->var

There's a "->" symbol when we call a variable, and i'd like to know what actually does the "->" means. I tried to do some research but the textbook and the internet don't explain this clealy.

Thanks in advance.

Anson Aştepta
  • 1,125
  • 2
  • 14
  • 38

1 Answers1

0

PHP has two Object Operator namely -> and ::

-> is used when you are trying to call a method on an Instance and / or access an Instance property.

:: is used when you want to call a static method or call a parent class's version of a method within a child class.

Abrar Khan
  • 175
  • 10