Alpha ZealPHP is early-stage and under active development. APIs may change between minor versions until v1.0. Feedback and bug reports welcome on GitHub.

ZealPHP Documentation

Two surfaces, one source of truth. 25 narrative guides walk through each subsystem with worked examples; the API reference is auto-generated from src/ docblocks and covers every public method, property, and class.

Want a guided learning experience? Head over to the Learn section for step-by-step tutorials.

Getting started

Routing & responses

  • Routing route(), nsRoute, nsPathRoute, patternRoute + parameter injection.
  • API Layer ZealAPI file-based REST, v0.2.25 auth hooks.
  • Error Handling setErrorHandler, ext-zealphp overrides, recursion guard, content-negotiated 5xx.
  • Templates & Rendering render / renderToString / renderStream / include / fragment.
  • HTMX isHtmx() + HtmxResponse, App::renderHtmx(), fragments, hx-boost — the full hypermedia surface.

Surfaces

  • Streaming yield-based SSR, stream(), sse(), renderStream.
  • WebSocket App::ws(), per-worker fd map, frame opcodes, cross-worker broadcast.
  • WSRouter Production Hardening federated WebSocket rooms — capacity, auth, backpressure, stats.
  • Tasks & Concurrency go(), task workers, App::tick/after, coproc().
  • Middleware & Auth The full PSR-15 middleware catalog + common Apache/nginx behavior coverage.

Operations

  • Deployment systemd unit, CLI flags, PID files, Docker, OPcache tuning.
  • CLI Reference php app.php start/stop/restart/status/logs, ports, PID files, --dev.
  • Dev Hot-Reload App::devReload() / ZEALPHP_DEV=1 / php app.php --dev — routes reload, no restart.
  • FastCGI Backends Front php-fpm or any FCGI server — cgiMode('fcgi') + registerCgiBackend() for custom upstreams.
  • Environment Variables Canonical reference for every ZEALPHP_* variable — defaults, scope, semantics.
  • Fuzzing slowhttptest, radamsa, gabbi — HTTP framing & conformance fuzzing.
  • Security Research Vulnerability classes (UAF / cross-tenant leak / unbounded leak) + the ASAN & Valgrind methodology for auditing the per-coroutine isolation runtime.

Background