#namespace_test_1.php

<?php

namespace namespace_test_1;

class test

{

  const NAMESPACE = 'namespace_test_1';

  public static function run()

{

  echo self::NAMESPACE.PHP_EOL;

  }

?>

#namespace_test_2.php

<?php

namespace namespce_test_2;

class test

{

  const NAMESPACE = 'namespace_test_2';

  public static function run()

  {

    echo self::NAMESPACE.PHP_EOL;

  }

}

?>

#namespace_test_3.php

<?php

namespace namespace_test_3;

use namespace_test_1 as name_1;

use namespace_test_2 as name_2;

!class_exist('namespace_test_1\test')  && require './namespace_test_1.php';

!class_exist('namespace_test_2\test') && requeire './namespace_test_2.php';

class test

{

  const NAMESPCE  = 'namespace_test_3';

  public static function run()

  {

    echo self::NAMESPACE.PHP_EOL;

  }

}

name_1\test::run();   //namespace_test_1

name_2\test::run();   //namespace_test_2

test::run();      //namespace_test_3

?>

最新文章

  1. 使用PL/SQL工具比对表结构,同步表结构
  2. 关于16年2月14日以后上传AppStore出现:Missing iOS Distribution signing identity for...的问题
  3. javascript 时间倒计时
  4. Stanford大学机器学习公开课(六):朴素贝叶斯多项式模型、神经网络、SVM初步
  5. 怎样基于android4.4.2的源代码和android-4.3.1_r1的驱动编译I9250的ROM
  6. 【Shell脚本学习13】Shell数组:shell数组的定义、数组长度
  7. 列出man手册所有函数的方法
  8. Android中的缓存机制与实现
  9. Inno Setup入门(九)&mdash;&mdash;修改安装过程中的文字显示
  10. 如何远程调试zookeeper集群
  11. python之面试复习
  12. 安装部署jumpserver3.0
  13. cout关闭输出缓冲,调试用
  14. Spring Boot Starters启动器
  15. 学习ML.NET(3): 导入数据集
  16. PHP自动加载上——spl_autoload_register
  17. tsm 切记
  18. Hystrix 使用入门
  19. hadoop 问题及解决方式
  20. linux 下查看磁盘IO状态

热门文章

  1. Golang学习 - sort 包
  2. CentOS安装某个命令的办法如locate
  3. webrtc学习(一): webrtc开始
  4. Entity Framework 使用注意:Where查询条件中用到的关联实体不需要Include
  5. Linux 下configure 参数配置与软件的安装与卸载
  6. Java基础知识强化104:Serializable接口 与 Parcelable接口
  7. Android 高级UI设计笔记13:Gallery(画廊控件)之 循环显示图像
  8. JD轮播图代码
  9. Jboss中不能正常的解析EL表达式
  10. 使用Excel批量更改或插入SQL语句