Development
Project Structure
src/Lexertokenizationsrc/Parserparser + ASTsrc/Runtimeinterpreter and execution contextsrc/Hosthost model types and resolvertestsunit + integration tests
Quality Checks
Run full tests:
composer test
Syntax lint:
rg --files src tests | xargs -n1 php -l
Performance Benchmarks
Run the runtime benchmark suite:
composer bench
Run a smaller quick check:
composer bench -- --iterations=200 --warmup=20
List benchmark cases and run selected ones:
composer bench -- --list
composer bench -- --case=parse_loop_sum --case=dispatch_advanced_mixed_flow
Build Docs (MkDocs)
Serve locally:
mkdocs serve
Build static site:
mkdocs build
Publish Docs On Dokku
The repository includes a multi-stage Dockerfile that builds the MkDocs site
from docs/ and mkdocs.yml, then serves the generated output with Nginx.
Recommended Dokku setup:
dokku apps:create hyperphp-docs
dokku domains:set hyperphp-docs docs.example.com
git remote add dokku dokku@your-server:hyperphp-docs
git push dokku main
Enable TLS after the domain is in place:
dokku letsencrypt:enable hyperphp-docs
Deployment notes:
- No persistent storage is required.
- No environment variables are required for the docs app.
- Dokku should build from the repo
Dockerfile, not from the checked-insite/directory.