What does PHP's underscore function do?

后端 未结 4 834
Happy的楠姐
Happy的楠姐 2020-12-09 09:06

What does this function do?

_()

Can you link me to the relevant documentation, as searching for \"_\" is nigh on impossible?

相关标签:
4条回答
  • 2020-12-09 09:11

    Note sure I understand your question but here are some explanations for common scenarios.

    • PHP Magic Method
    • Old PHP4 method of defining private methods
    • gettext() alias used for localisation
    0 讨论(0)
  • 2020-12-09 09:17

    If you open http://www.php.net/_ you get to the documentation of the _() function and see its for localization stuff (gettext).

    0 讨论(0)
  • 2020-12-09 09:21

    _() is an alias of gettext().

    0 讨论(0)
  • 2020-12-09 09:21

    It's an alias for the gettext() function.

    0 讨论(0)
提交回复
热议问题