Blogger Information
Blog 64
fans 2
comment 3
visits 75699
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
use 导入空间/别名
清雨的博客
Original
692 people have browsed it

实例

<?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 = '汉克';
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

输出结果

r.png

Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post