<?PHP namespace my_module; # bunch of namespaced functions # ... # then I want to define a global function my_module() # that is an alias to my_module\mymodule()
<?PHP namespace my_module; # bunch of namespaced functions # ... # then I want to define a global function my_module() # that is an alias to my_module\mymodule()
例:
namespace my_module { function module_function() { // code } } namespace { // global namespace. function my_module() { // call your namespaced code } }