Multiple Files and Namespaces Scope

后端 未结 1 1228
遇见更好的自我
遇见更好的自我 2020-12-21 00:08

I\'m pretty new to namespaces (and yes, I\'ve read the PHP documentation namespaces section). I\'m wondering what the scope of namespaces is with regard to multiple files. I

1条回答
  •  失恋的感觉
    2020-12-21 00:56

    Any time you refer to a class that is outside of the current file or class scope, you use its namespace:

    But if you "use" the namespace in your script, you can leave it out:'

    0 讨论(0)
提交回复
热议问题