php命名空间示范
<?php
//一个文件里两个命名空间
namespace Article;
class comment{
function test(){
return 'aaa';
}
}
namespace MessageBoard;
class Comment{
function test(){
return 'www';
}
}
$comment = new comment();
$a = new \MessageBoard\Comment();
echo $a->test();
$obj = new \Article\Comment();
echo $obj->test();
?>