Home  >  Article  >  Backend Development  >  不是new出来的对象也能用->取值吗,该如何处理

不是new出来的对象也能用->取值吗,该如何处理

WBOY
WBOYOriginal
2016-06-13 12:09:56823browse

不是new出来的对象也能用->取值吗
一般来说php面向象的取值用->符号,即先new了一个对象,再用这个箭头工具获取类中的方法和属性。但发现下图中竟然没有new也能用这个箭头取值,这如何理解呢?难道php还有潜规则吗,即没有明说的规则吗


------解决思路----------------------
$mysql->query() 返回的是一个 对象,已经实例化。

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