StrataPHP installs like any other PHP package. No global binaries needed.
composer require lazysod/strataphp
This installs the latest stable version from Packagist.
composer config repositories.strata vcs https://github.com/lazysod/strataphp-public
composer require lazysod/strataphp:dev-main
Use this if you want the latest unreleased code from GitHub.
Create public/index.php:
<?php
require __DIR__ . '/../vendor/autoload.php';
use Strata\App;
$app = new App();
$app->get('/', fn() => 'Hello, Strata');
$app->run();
For quick testing, use PHP's built-in server:
php -S localhost:8000 -t public
Then open http://localhost:8000 in your browser. You should see "Hello, Strata".
Or use XAMPP / MAMP and point the document root to public_html/.
Strata doesn’t force a structure, but this is a good start:
your-project/
├── public/
│ └── index.php ← Web entry point
├── src/ ← Your app code, PSR-4 autoloaded
├── vendor/ ← Composer dependencies
├── composer.json
└── .env ← Config, optional
composer dump-autoload. Make sure you included require vendor/autoload.php at the top of your file.