Click here to Skip to main content
16,020,811 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can Some one tell me what for -> symbol is used in PHP?
Posted

If you have a look here: http://www.robert-gonzalez.com/2009/03/04/php-operators-double-and-single-arrow/[^] and scroll about 1/3 of the way down, there is a good description of the PHP object operator.
 
Share this answer
 
Comments
ZeeroC00l 14-May-11 9:11am    
My +5 for the link.
Bookmarked it
rashidfarooq 14-May-11 9:37am    
thanks for answering.
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.

Example for -> Operator[^]

BR//
Harsha
 
Share this answer
 
Comments
rashidfarooq 14-May-11 9:37am    
thanks for answering.
I found this[^] in less time than it would take to post your question.
 
Share this answer
 
Comments
rashidfarooq 14-May-11 9:37am    
thanks for answering.
-> is used when you are trying to call a method on an Instance
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900