Пример #1
0
<?php

namespace com\getinstance\util;

class Debug
{
    static function helloWorld()
    {
        print "hello from Debug\n";
    }
}
namespace main;

\com\getinstance\util\Debug::helloWorld();
Пример #2
0
<?php

namespace com\getinstance\util;

class Debug
{
    static function helloWorld()
    {
        print "hello from Debug\n";
    }
}
namespace main;

use com\getinstance\util\Debug as uDebug;
class Debug
{
    static function helloWorld()
    {
        print "hello from main\\Debug";
    }
}
uDebug::helloWorld();
Пример #3
0
<?php

namespace com\getinstance\util;

class Debug
{
    static function helloWorld()
    {
        print "hello from Debug\n";
    }
}
namespace main;

use com\getinstance\util;
util\Debug::helloWorld();