--input.php(static methods)

this my folder structure.THe config.php has spl_autoload_register.

spl_autoload_register(function ($class) {
    if (file_exists("lib/{$class}.php")) {
        require_once "lib/{$class}.php";
        require_once "include/lib/{$class}.php";

i can access classes everywhere from project.but nont from book folder.I used namespace also.its not work for static method.

I am using the fig-standard auto loader. Pretty much all frameworks today are using the proposed loading standard.

to call static method of class with namespace, you can easily do it like this.. say we have a MyClasss with namespace

namespace App\Doer;

class MyClass

    public static function just_do_it()
        return 'I am doing it';



On another page we can include the class page


use App\Doer as Dude;

## call the static method