This works if the foo\Another
class is defined in another file without such alias.
another.php
<?php
namespace foo;
class Another { }
test.php
<?php
namespace foo;
use My\Full\Classname as Another;
require_once 'another.php';
new namespace\Another;
The example given is to illustrate namespace resolution and conveniently ignores other details and conflicts which may arise.