Correction status:Uncorrected
Teacher's comments:
<?php /** * Created by PhpStorm. * User: 清雨 * Date: 2018/5/9 * Time: 9:00 */ namespace one; require 'two.php'; use two\Demo as Demo1; class Demo { public $name = '加菲猫'; } echo (new Demo1) ->name,'<br>'; echo (new Demo()) ->name,'<br>';
点击 "运行实例" 按钮查看在线实例
<?php /** * Created by PhpStorm. * User: 清雨 * Date: 2018/5/9 * Time: 9:01 */ namespace two; use one\Demo as Demo1; class Demo { public $name = '汉克'; }
点击 "运行实例" 按钮查看在线实例
输出结果