Blogger Information
Blog 2
fans 0
comment 0
visits 1143
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
self,this和parent
LYampampamp劉陽的博客
Original
611 people have browsed it

self用于访问当前类中的静态属性和静态方法,不需要创建实例。声明类属性或方法为静态,就可以不实例化类而直接访问。

parent用于访问父类中的静态方法和静态实例

this用于在实例中调用属性和方法,对于父类中(在本实例)可用的属性和方法,也可以进行访问,在使用this时,实例是必要的。


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post