Menu

Documentation

Guides

InstallManticore compiles PHP to a native binary with no PHP runtime in it — no interpreter, no php.ini, no extension loader. It is not statically linked,… CLI referenceEvery manticore command, its options and exit codes. The text under each command is the declared help (manticore <command> --help); tests/cli/help.txt… The supersetManticore's design goal is that PHP feels like PHP: the interpreter is the oracle, and tools/difftest.sh compares our output against it case by case.… Differences from PHPManticore's goal is that a program prints the same bytes as php. This page is the honest list of where it does not: what a compiled program does diffe… AsyncPart of the standard distribution: the runtime ships in prelude/async.php (demand-gated on an Async mention), the demos live in examples/async/. A pur… ModulesManticore builds multi-file PHP projects from a single cargo-style manifest, manticore.json. One manifest defines every artifact — your application… FFIManticore calls into native C libraries directly. You declare a PHP function, tag it with attributes naming the library and the C symbol, and the comp… AttributesPHP 8 attributes consumed by the Manticore compiler at AOT time. All attributes are read during compilation; none allocate at runtime. Unknown attribu… GenericsPHP has no native generic syntax, so Manticore reads generics from docblocks (@template, @var C<T>, @param T, @return T, T[], array<K,V>) and the call… Memory modelManticore compiles PHP to native code with no garbage-collected runtime. Every value (string, array, object) is reclaimed by one of three strategies,… Typed arrays (Ds)Fixed-width, statically typed arrays over one native buffer. A PHP array stores every element as a tagged cell behind a hash/vector buffer; a Manticor… HTTP serverA handler is callable(Http\Request): Http\Response. Nothing else is required: no router, no middleware, no container, no php.ini. WebSocketReal-time over the same server and port as HTTP (chat, live updates, push), and outbound WebSocket connections to third-party servers, over one core:… PDOPHP Data Objects with three drivers: SQLite (libsqlite3 over FFI), PostgreSQL and MySQL / MariaDB (the wire protocols in pure PHP over a socket: no li… curlAn HTTP client with php's own surface — curl_init, curl_setopt, curl_exec, curl_getinfo, the curl_multi_* and curl_share_* families — bound to lib…

Reference

Internals