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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:09:56
Original
916 people have browsed it

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


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

Related labels:
Statement of this Website
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
Latest Issues
Hello everyone, new report
From 1970-01-01 08:00:00
0
0
0
What does the new operator do?
From 1970-01-01 08:00:00
0
0
0
Will there be any new ones later?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template