PHP 5.3命名空间应该使用反斜杠的每个PHP函数吗? [英] PHP 5.3 Namespaces should i use every PHP function with backslash?
问题描述
那么所有php内部函数呢?例如strstr?
现在我应该使用每个PHP内部函数与\?避免PHP首先检查命名空间?这是一个巨大的性能下降?你认为什么?
无论性能如何,都不应该这样做。 Ew,新闻,新闻。任何性能提升可能都不值得您的理智。
im now using namespaces in PHP 5.3 now there is a fallback mechanism for functions which dont exist in the namespace. so php every time checks if the function exists in namespace and then tries to load it from global space.
So what about all php internal functions? strstr for example? Should i now use every php internal function with a \ ? to avoid php first checking the namespace? is this fallback a huge performance drop? what do you think?
No matter the performance hit, no way should you do that. Ew, ew, ew. Any performance boost there may be is not worth your sanity.
这篇关于PHP 5.3命名空间应该使用反斜杠的每个PHP函数吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!