Should I namespace global functions in PHP?

前端 未结 3 473
死守一世寂寞
死守一世寂寞 2021-01-02 00:49

In PHP, I\'m using namespaces at the class level. However, Netbeans keeps telling me namespace my global functions as well. For example, if I type

str_replac         


        
3条回答
  •  别那么骄傲
    2021-01-02 01:00

    Overzealous for sure, but I can't reproduce this is Netbeans 7.0.1, with PHP Plugin 1.17.1. It's not the convention, anyway, and I would not consider it a best practice at all.

提交回复
热议问题