批改状态:合格
老师批语:
<?php
namespace one;
use one\two\Test as Test1;
class Test{public $name = '小明';}
const SEX = '男';
function study($program = 'PHP'){return $program;}
echo (new Test)->name.'是'.SEX.'学习'.study();
echo '<hr>';
echo (new Test1)->name.'是'.(new Test1)->sex.'学习'.(new Test1)->study;
namespace one\two;
class Test
{
public $name = '小红';
public $sex = '女';
public $study = 'JAVA';
}点击 "运行实例" 按钮查看在线实例
测试效果图:

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号