mirror of
https://github.com/igorsimdyanov/php8.git
synced 2025-07-25 17:13:08 +00:00
12 lines
386 B
PHP
12 lines
386 B
PHP
<?php
|
||
spl_autoload_register(function(string $classname){
|
||
$namespace = array_map(
|
||
fn($class) => $class != 'PHP8' ? strtolower($class) : $class,
|
||
explode('\\', $classname)
|
||
);
|
||
require_once(__DIR__ . '/' . implode('/', $namespace) . '.php');
|
||
});
|
||
|
||
$page = new PHP8\Page('О нас', 'Содержимое страницы');
|
||
$page->authors(); // Author::authors()
|