开发者

PHP 5.3 Namespaces should i use every PHP function with backslash?

开发者 https://www.devze.com 2022-12-28 06:58 出处:网络
im now using namespaces in PHP 5.3 now there is a fallback mechanism for functions which don开发者_StackOverflow中文版t exist in the namespace. so php every time checks if the function exists in names

im now using namespaces in PHP 5.3 now there is a fallback mechanism for functions which don开发者_StackOverflow中文版t 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号