什么是“ - >”的含义。 PHP中的符号 [英] What is meant by "->" symbol in PHP
本文介绍了什么是“ - >”的含义。 PHP中的符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以告诉我 - >符号在PHP中使用?
Can Some one tell me what for -> symbol is used in PHP?
推荐答案
如果你看一下这里:http://www.robert-gonzalez.com/2009/03/04/php-operators-double-and-single-arrow/ [ ^ 并滚动约1/3向下,有一个很好的PHP对象操作符描述。
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.
PHP有两个对象操作符即 - >和::
- >当您尝试在实例上调用方法和/或访问实例属性时使用。
::用于调用静态方法或在子类中调用父类的方法版本。
示例 - >运营商 [ ^ ]
BR //
Harsha
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
我发现这个 [ ^ ]的时间少于发布问题所需的时间。
I found this[^] in less time than it would take to post your question.
这篇关于什么是“ - >”的含义。 PHP中的符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文