<?phpclass hello{ function say() { echo "hello world !"; } }
<?phprequire_once('test1.php'); require_once('test2.php'); require_once('hello.php'); use space\test1\test;use space\test2\test as test2;$test1 = new test();$test2 = new test2(); $hello = new \hello();$test1->say(); $test2->say(); $hello->say();
以上是php全局类实例介绍的详细内容。更多信息请关注PHP中文网其他相关文章!