php命名空间粗解

// 创建命名空间Article
namespace Article;
class Comment { }

// 创建命名空间MessageBoard
namespace MessageBoard;
class Comment { }

//调用当前空间(MessageBoard)的Comment类
$comment = new Comment();

//调用Article空间的Comment类
$article_comment = new ArticleComment();

原文地址:https://www.cnblogs.com/isuben/p/5333813.html