7.12.3 PHP在同一文件中定义多个命名空间

7.12.3 PHP在同一文件中定义多个命名空间

test.php

";
            }
        }

        function test() {
            echo "222222222222222
"; } test(); \hello\world\test(); echo AAA."
"; echo \hello\world\AAA."
"; Demo::one(); \hello\world\Demo::one(); } $a = 10; namespace meizi\pl { const BBB = 2; echo BBB."
"; echo \meizi\pl\BBB."
"; echo \hello\world\AAA."
"; } namespace { \var_dump(100); }

你可能感兴趣的:(7.12.3 PHP在同一文件中定义多个命名空间)