将一个类赋值的问题定义了一个类class myclass{function test()echo good}$test1myclass$test2new
将一个类赋值的问题
定义了一个类
class myclass
{
function test()
echo "good";
}
$test1="myclass";
$test2=new myclass();
都是把类赋值给变量,那这两种赋值方法有什么差别?
[解决办法]
你分別輸出那兩個變量就知道啦
将一个类赋值的问题
定义了一个类
class myclass
{
function test()
echo "good";
}
$test1="myclass";
$test2=new myclass();