Skip to content

Repository files navigation

zphp

zphp is a PHP runtime written in Zig with PHP 8.x compatibility. It includes a built-in HTTP server with WebSocket support, TLS, and HTTP/2, database drivers for SQLite, MySQL, and PostgreSQL, and cURL bindings for HTTP client operations.

zphp run app.php # run a script
zphp serve app.php --port 8080 # start an HTTP server
zphp build --compile app.php # compile to a standalone executable
zphp test# run tests
zphp fmt src/*.php # format code
zphp install # install packages from composer.json

Quick comparison

PHPzphp
Run a scriptphp script.phpzphp run script.php
HTTP serverphp-fpm + nginxzphp serve app.php
Install depscomposer installzphp install
Add a packagecomposer require pkgzphp add pkg
Run testsphpunitzphp test
Format codephp-cs-fixer fixzphp fmt
Standalone binary-zphp build --compile app.php

Installation

Download prebuilt binaries from GitHub Releases. See the documentation for building from source and detailed guides.


This project is an experiment in AI-maintained open source - autonomously built, tested, and refined by AI with human oversight.

About

A fast PHP runtime

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages