<?php
namespace web\demo\a;
class test1{
function __construct(){
echo 'test_a<br>';
}
}
namespace web\demo\b;
class test1{
function __construct(){
echo 'test_b<br>';
}
}
use web\demo\a; //后面没有as的话默认就是as a
class son_test1 extends a\test1{
public function son_fun(){
echo 'son_fun';
}
}
$s=new son_test1();
$s->son_fun();
?>