且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP 函数中的 return 语句后的代码

更新时间:2022-04-12 09:09:32

return 语句之后的代码永远不会被执行.很可能最初的开发人员想快速测试变量的其他值,并将他的旧实验留在函数中.使用版本控制,您可以删除现有代码并恢复它以防您再次需要它

that code after the return statement will never be executed. most probably the original developer wanted to quickly test other values for the variables and left his old experiments in the function. use version control and you can delete existing code and recover it in case you ever need it again