swoole/typephp
Compile PHP to Native Binaries
Build with Backblaze B2
SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.
Loading star history...
Where it stands
Rank, growth pace and release cadence relative to everything GStars tracks.
5 releases in the last 90 days, the latest 13 days ago, with 18 contributors on GitHub.
Use Cases & Benefits
- Compile PHP source code into optimized native machine code executables, extensions, or shared libraries using ahead-of-time compilation.
- Delivers near-native performance by translating PHP to statically-typed C++ and native binaries while preserving PHP syntax and interoperability with Zend runtime.
- Use for building high-performance CLI tools or long-running services that benefit from native execution speed and reduced startup overhead.
- Use for creating PHP extensions that integrate compiled functions and classes directly into the PHP runtime for enhanced performance.
- Use for developing reusable shared libraries from PHP codebases to be consumed by other projects or languages with native bindings.
Should you depend on it?
License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.
License
GPL 3.0
Copyleft: distributing software that includes it generally requires releasing your source under the same license.
Community files
- README: present
Watch-outs
- GPL-style copyleft: including it in distributed software generally requires releasing your source under the same license.
General guidance from repository metadata, not legal advice. How we score
From the README
A native AOT compiler for PHP
Compile PHP source code into native machine code ahead of time — producing native executables, PHP extensions, and shared libraries — while keeping the PHP syntax you already know.
TypePHP is an Ahead-Of-Time (AOT) compiler that translates PHP source code into C++ and then into native machine code. Unlike a bytecode cache or a VM, it does not interpret opcodes at runtime: it generates optimized native binaries that run directly on the CPU.
It keeps familiar PHP syntax and adds compile-time type information, so the compiler can emit fast, statically-typed C++ for hot paths. Dynamic PHP values, internal functions, reflection, and object metadata continue to interoperate with the Zend runtime through PHPX; user functions are not executed as Zend opcodes after they have been compiled.
TypePHP is written entirely in PHP and is fully self-hosting: the
tpccompiler binary is built by compiling the compiler's own PHP source code with TypePHP. The bootstrap chain is pure PHP — no C or C++ glue in the compiler itself.TypePHP is under active development. It intentionally supports a defined, testable subset of PHP rather than claiming drop-in compatibility with every dynamic PHP program. Read Compatibility model and the incompatible-feature list before adopting it for an existing application.
Daily snapshots
Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots
+665 stars over 60 days across 6 snapshot days; best day +136 on Aug 29.
Forks
78+40
Open issues
4-1
Compared with peers in Backend
Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth
| Repository | Stars | +7d | Health | Last release |
|---|---|---|---|---|
| anthropics/skills | 187.8K | +2.9K | 15 | — |
| DuarteSantos8/openGym | 19.7K | +2.4K | 60 | 2 days ago |
| shiyu-coder/Kronos | 47.0K | +2.3K | 16 | — |
| NationalSecurityAgency/ghidra | 98.2K | +2.3K | 64 | 14 days ago |
| microsoft/VibeVoice | 56.0K | +1.1K | 29 | — |
| swoole/typephp | 1.5K | — | 49 | 13 days ago |
| Category median | 56.0K | +2.3K | 29 | — |
Discover Repositories
Search across tracked repositories by name or description