Home > Backend Development > PHP Tutorial > PHP反射机制的作用

PHP反射机制的作用

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:50:51
Original
1280 people have browsed it

已经知道的作用是:可以动态加载还不知道类名的类,由此实现插件功能

还有别的什么作用吗?

回复内容:

已经知道的作用是:可以动态加载还不知道类名的类,由此实现插件功能

还有别的什么作用吗?

还蛮多的,比如权限中访问控制,典型的MVC中权限模块

PHP5添加了一项新的功能:Reflection。这个功能使得phper可以reverse-engineer class, interface,function,method and extension。通过PHP代码,就可以得到某object的所有信息,并且可以和它交互。

Related labels:
php
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
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
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