Home > Backend Development > PHP Tutorial > 基础问题求普及,谢谢

基础问题求普及,谢谢

WBOY
Release: 2016-06-23 13:30:39
Original
814 people have browsed it

__callStatic 是静态方式调用一个不存在的方法,会被这个方法拦截

请问下,有没有一个方法是,静态调用一个不存在的属性,会被拦截的

就像__get 可以判断实例化的属性一样,有没有可以判断静态调用的属性的?


回复讨论(解决方案)

没有!
无论是静态方法还是静态属性,其实都不属于对象范畴
php5 区分静态和动态其实是一种倒退(php4 是不区分的)

静态方法还是静态属性 实际是作用域受限的函数和变量

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