Saturday, August 25, 2018

Where do we use the object operator "->" in PHP?





What are the different ways where we can use object operators -> in PHP?


Answer



PHP has two object operators.



The first, ->, is used when you want to call a method on an instance or access an instance property.




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


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...