PHP功能中的下划线 [英] Underscore in php function
本文介绍了PHP功能中的下划线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
PHP函数名称以下划线开头是什么意思?
What does it mean when a PHP function name begins with an underscore?
例如:__construct()
我知道构造的含义,但是我看过其他函数以下划线或双下划线开头的地方,但我不确定其含义.
I know what the construct means but I've seen other places where the function begins with an underscore, or a double underscore and I'm just not sure of the significance.
推荐答案
这意味着PHP隐式调用它.
It means that PHP calls it implicitly.
这被称为魔术方法"
另外,这是两个下划线,而不是一个.
Also, it's two underscores, not one.
在此处了解更多信息: PHP魔术方法
Learn more here: PHP Magic Methods
这篇关于PHP功能中的下划线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文