<?php
spl_autoload_register(function ($className) {

    $file = __DIR__ . "/" . $className . ".php";
    $file = str_replace("\\", "/", $file);

    if (is_file($file)) {
        require_once $file;
    }
});
