TypePHP: AOT Compiler Translates PHP to Native Binaries

Repositoryswoole/typephpTool

TypePHP is an Ahead-Of-Time (AOT) compiler developed under Swoole that translates PHP source code into C++17 and then into native machine code. It produces standalone executables, PHP extensions, shared libraries, or WASI components without interpreting Zend opcodes at runtime.

Key points

  1. Translates PHP source code via C++17 directly into native machine code for the CPU
  2. Generates native executables, PHP extensions, shared libraries, and WASI components
  3. Written entirely in PHP and fully self-hosting (the tpc compiler builds itself)
  4. Interoperates with the Zend runtime for dynamic values and reflection using PHPX
  5. Targets PHP 8.4 to 8.5 and focuses on a defined, testable subset of the language
  6. Maintains CI pipelines across Linux (x64, ARM64), macOS (ARM64), and Windows (x64)

Why it matters

PHP has traditionally faced performance trade-offs for CPU-bound tasks due to opcode interpretation. TypePHP enables native CPU performance while retaining familiar PHP syntax, though it requires stricter typing and is not a drop-in replacement for arbitrary dynamic codebases.

Analysis

The project serves developers looking to write performance-critical paths, CLI tools, or native PHP extensions without switching to C or Rust. While technically ambitious and self-hosting, it is under active development and intentionally restricted to a language subset, meaning legacy applications and dynamic frameworks cannot run out of the box.

Found in

Summary generated by AI (Gemini 3.8 Flash, 27 September 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • Repository:vercel-labs/zerolang

    Zerolang: An Experimental Graph-Native Programming Language for Agents

    Vercel Labs has introduced Zerolang, a programming language tailored specifically for AI agents. Rather than manipulating plain text files line by line, agents operate on a semantic program graph ('zero.graph') using structured queries and checked compiler patches. Traditional code files (.0) act primarily as human-readable projections.

    5.4kstarsC

    AI & LLMs· Tool

  • Repository:rauchg/gdp-ts

    gdp-ts: Compile-Time Authorization Proofs in TypeScript

    gdp-ts brings the 'Ghosts of Departed Proofs' paradigm to TypeScript, enforcing authorization and entitlement checks at compile time via the type checker.

    550starsTypeScript

    Web development· Tool

  • Repository:coollabsio/coolify

    Coolify: Open-source PaaS alternative for self-hosted cloud deployments

    Coolify is an open-source, self-hostable Platform-as-a-Service (PaaS) under the Apache 2.0 licence, designed as an alternative to Vercel, Heroku, and Netlify. It allows users to deploy web apps, static sites, databases, and over 280 one-click services onto their own servers via SSH.

    61.4kstarsPHP

    Web development· Tool

  • X post:Tomas Votruba

    Vivace: Rust-Based Composer Alternative Claims 5-16x Faster Installs

    Tomas Votruba highlights Vivace, a new Rust-based drop-in replacement for 'composer install'. According to a referenced Reddit post, the tool offers 5 to 16 times faster dependency installation compared to standard Composer.

    24bookmarks4.2kviews

    Web development· News

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.