Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在全局空间中声明波纹管函数?
namespace something\else; function example() { #some code here }
来自PHP 文档:
要将全局非命名空间代码与命名空间代码结合起来,仅支持括号语法。
因此,如果您可以完全控制 PHP 文件,请尝试
namespace Something { function example() { } } namespace { function example() { } }