PHP code example of usmanakram / php-autoload-hello-world
1. Go to this page and download the library: Download usmanakram/php-autoload-hello-world library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
usmanakram / php-autoload-hello-world example snippets
namespace HelloWorld;
class OurFirstClass
{
public static function hello()
{
return 'Hello World, Composer!';
}
}
use HelloWorld\OurFirstClass;
echo OurFirstClass::hello();