几个php基础但是书下没找到的有关问题

WBOY
Release: 2016-06-13 12:53:57
Original
653 people have browsed it

几个php基础但是书上没找到的问题
看见很多框架里面有些代码前面加上两个下划线,比如 __isset, __construct等等,是不是在自定义函数前面也能加两个下划线?两个下划线有什么作用?
还有一个写法是 _e ,这是什么??

这些都不是基础编程里的吧?我在基础教程里都没见到过??

各位大大教教我呗


------解决方案--------------------
搜索:php 魔术方法
------解决方案--------------------
加不加下划线没有实际影响,只是让初学者不要去这么命名,避免可能会和自带的方法产生冲突。
------解决方案--------------------
上面两个是魔术方法,下面一个应该是框架自定义的方法
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!