Demo API in PHP 8.2 senza framework pesanti (solo PDO + routing minimale).
GET /health→{"ok":true}GET /items→ lista itemsPOST /items→ crea item{ "title": "..." }GET /invoices→ lista fatture (mock)
- PHP >= 8.1 con estensione PDO SQLite
- Composer (per autoload PSR-4 e PHPUnit)
composer install
php -S 127.0.0.1:8080 -t public
# in un altro terminale:
curl http://127.0.0.1:8080/health./vendor/bin/phpunitpublic/index.php # front controller + routing
src/ # domain + repo
tests/ # unit test
data/app.db # sqlite db (auto-creato al primo run)