PHP OOP namespaces

PHP namespaces allow using classes of the same name in a single php file.

require_once("FirstClass.php");
require_once("SecondClass.php");

$first=new First\Account();
echo $first->name;

$second=new Second\Account();
echo $second->name;
© 2016 - 2022, All Rights are Reserved.