point.php实例
<?php namespace point { require 'road.php'; use road\Point as newpoint; class Point { public $pointName; function __construct($pointName) { $this->pointName = $pointName; return $this->pointName; } } echo (new newpoint('青园路日辉路'))->pointName; }
运行实例 »
点击 "运行实例" 按钮查看在线实例
road.php实例
<?php namespace road { class Point { public $pointName; function __construct($pointName) { $this->pointName = $pointName; return $this->pointName; } } }
运行实例 »
点击 "运行实例" 按钮查看在线实例