

Then we declared the namespace HelloWorld in our greetings.php file. Remember the directory stucture src/HelloWorld and the require statement in the composer.json file? In our composer.json we told the autoloader to expect a psr-0 directory structure and that our code would be in src.

It is beyond the scope of this article to discus how the autoloader works, just that it does and how to use it.

Like I said before, autoloading and composer give us the handy use and namespace keywords. '/./vendor/autoload.php' use HelloWorld\Greetings echo Greetings :: sayHelloWorld ()