<?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中文網其他相關文章!