Compatibility
Phasis is verified against three independent oracles:
- test262 — the official TC39 ECMAScript conformance suite. 100 % of the revision pinned in the repository.
- Web Platform Tests — the official WHATWG / W3C suite for non-ECMAScript Web APIs (fetch, XHR, WebSocket, Streams, Headers, Blob, encoding, URL, structured-clone, abort, hr-time, atob, crypto). 100 % on the imported corpus.
- Popular libraries — 204 widely-used npm packages (acorn, lodash, zod, ramda, immer, redux, date-fns, marked, fuse.js, semver, validator, …) execute byte-equal to Node.js.
vs other engines
| Engine | test262 | Notes |
|---|---|---|
| Phasis | 100 % | Pure PHP. Targets ES2024+. |
| V8 (Node, Chrome) | 99.8 % | Reference C++ engine. |
| SpiderMonkey (Firefox) | 99.6 % | Reference C++ engine. |
| JavaScriptCore (Safari) | 99.4 % | Reference C++ engine. |
| QuickJS | ~97 % | Lightweight embeddable engine in C. |
| Hermes (React Native) | ~95 % | Embeddable engine optimized for mobile. |
Numbers from test262.fyi. Phasis sits in the top tier alongside the production browser engines.
Pages
- test262 coverage — what's tested, how the suite runs, why 100% matters.
- Web APIs (WPT) — Web Platform Pack and Fetch Pack: URL, encoding, atob/btoa, structuredClone, performance, Headers, Blob, AbortSignal, EventTarget, Streams, plus crypto, WebSocket, and XMLHttpRequest.
- Streams — full WHATWG Streams Standard: ReadableStream, WritableStream, TransformStream, BYOB, tee, pipeTo/pipeThrough, queuing strategies, async iteration.
- Popular packages — CI-gated byte-equality with Node.js for 204 npm packages across parsing, templating, validation, date/time, math, hashing, search/diff, color, URL handling, and more.
- Spec surface — every ECMAScript built-in, syntactic feature, and standard-library object that Phasis ships.
- Known limitations — where Phasis intentionally diverges from V8: performance ceiling, multi-agent concurrency, Wasm, browser-only Web APIs.
How it's measured
- test262 —
bin/test262runs the suite locally. The full matrix runs in thecompat-matrix.ymlworkflow, which is started by hand rather than on every push; a successful run commits its snapshot toCOMPAT.md, which records when it was taken and against which commit. The suite revision is the one pinned by thetest262git submodule. - Web Platform Tests —
bin/wptruns the imported fixtures. Thewpt.ymlworkflow runs them on pushes tomainand pull requests that changesrc/, the fixtures, or the Composer files. - Popular libraries —
composer testruns PHPUnit including the popular-library byte-equality suite undertests/Popular/. Thepopular.ymlworkflow runs it under the same path filter and also regenerates every oracle under real Node, so a stale oracle is caught when a vendored library is bumped.
A WPT or popular-package regression fails the pull request that causes it. A test262 regression shows up the next time the matrix is run.