WorkingNS

WorkingNS

  1. <?php
  2.  
  3. include("./class1.php");
  4. include("./class2.php");
  5.  
  6. $obj1 = new Acme\MyClass(); // No leading slash.. could be a problem if you're not in the global namespace
  7. $obj2 = new \Delta\MyClass();
  8.  
  9. $obj1->TEST();
  10. $obj2->TEST();
  11.  
  12. ?>
Comments are closed.