Home > Backend Development > PHP Tutorial > 一个面向对象的基础编程,该如何解决

一个面向对象的基础编程,该如何解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:53:25
Original
975 people have browsed it

一个面向对象的基础编程
$this->$name;
$this->name;
$this->name;是调用当前对象的name属性,$this->$name;是干什么的?二者有什么区别?
------解决方案--------------------
$name = 'abc';
$this->$name;
调用当前对象的 abc 属性
------解决方案--------------------
$this->name是直接调用
$this->$name间接调用

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template