Write naturally
Start with variables, arrays, functions and classes. Add explicit types where they communicate intent.
HolyPHP brings the directness of PHP-style syntax to a compiled language. Check your code, build a native program, and use one toolchain from your first script to a larger application.
// Write a small program
function greet(string $name): string {
return "Hello, {$name}!";
}
echo greet("Ada");
hphp run hello.hphpRun from your terminalRead what HolyPHP is, learn it step by step, look something up, or add a library to your program.
What the language and the toolchain do, in five minutes.
Read below ↓ 02Nine short chapters from installing to your first real program, then interactive lessons.
Start learning → 03The language and every built-in by topic: strings, math, arrays, regex, time, files, SQLite.
Open the docs → 0459 official bundled libraries: HTTP, YAML/TOML/CSV, JWT, collections, CLI, testing, threads and more.
Browse libraries →hphp create myappnew project with tests in one command — then hphp run and hphp testKeep the fast feedback loop of a scripting language, with a compiler that can produce a standalone native executable.
Start with variables, arrays, functions and classes. Add explicit types where they communicate intent.
Use hphp check to surface type and borrow errors without having to run the program.
Run a source file during development or build it into a native executable for distribution.
HolyPHP is not PHP running through FPM. Its compiler and runtime power programs written in the language itself.
Familiar variables, control flow, strings, arrays, classes, closures and typed function signatures.
&Compile-time rules help control aliases and mutation. Unsafe pointer operations are marked explicitly.
{ }59 official libraries bundled with the compiler — web, data formats, data structures, security, CLI and desktop apps.
>_Check, run, emit compiler output, build executables and manage packages from hphp.
Use the HolyPHP VS Code extension for syntax highlighting, completions and diagnostics.
□hphp create, dependencies in hphp.yaml, a lock file and hphp test.
HolyPHP offers inferred types for quick scripts and explicit signatures when you need them. Its borrow checker diagnoses supported conflicting uses before code generation.
How memory safety works →// Types can be inferred
$count = 3;
// Or stated in a signature
function total(int $a, int $b): int {
return $a + $b;
}
echo total($count, 4);
Installers build the compiler for your platform. A C compiler is used when hphp run or hphp build compiles a program.
Follow a guided path, experiment in your browser, or see how the project is built.