Skip to content

Instantly share code, notes, and snippets.

@vonglasow
Created August 5, 2013 11:53
Show Gist options
  • Save vonglasow/6155371 to your computer and use it in GitHub Desktop.
Save vonglasow/6155371 to your computer and use it in GitHub Desktop.
<?php
namespace Alpha {
class A
{
public function hello()
{
$b = new \Beta\B;
$b->world();
}
}
}
namespace Beta {
class B
{
public function world()
{
echo __NAMESPACE__;
}
}
}
namespace {
$a = new \Alpha\A;
$a->hello();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment