Clarification of PHP manual; default values passed by reference
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Due to inconsistencies in the PHP manual ( as I've posted about before ) I'm just inquiring about some clarification. The Function Arguments page ( http://ca2.php.net/manual/en/functions.arguments.php ) has the following note: Note : As of PHP 5, default values may be passed by reference. Now, I assume this simply means that the following syntax is acceptable: function foo(&$bar = null){ // ... } However, again due to other inconsistencies, I was wondering if perhaps this pertains to something else. 回答1: It means that in PHP 4, using a