Double Underscore in PHP?

后端 未结 5 2020
悲&欢浪女
悲&欢浪女 2020-11-30 09:17

What does the double underscores in these lines of PHP code mean?

$WPLD_Trans[\'Yes\']=__(\'Yes\',$WPLD_Domain);
$WPLD_Trans[\'No\']=__(\'No\',$WPLD_Domain);         


        
5条回答
  •  忘掉有多难
    2020-11-30 10:06

    Strictly speaking, it means nothing in PHP as it is not a pre-defined function. However, in many frameworks, like CakePHP, and other libraries the double underscore is a function used for translating strings based on the user's language/locale preference.

提交回复
热议问题