Home  >  Article  >  Backend Development  >  php中的箭头是什么意思啊解决办法

php中的箭头是什么意思啊解决办法

WBOY
WBOYOriginal
2016-06-13 13:28:231424browse

php中的箭头是什么意思啊
XX1“->”XX2中的箭头是什么意思,整个式子是什么意思

------解决方案--------------------
对象调用其属性或方法的符号:

PHP code

class  ABC{
    public $name="TOM";
    public function use(){
       echo "This is void.";
    }
}
$obj = new ABC();
echo $obj->name;    #TOM
$obj->use();        #This is void. <div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn