Skip to content

Releases: phpcpd-next/libphptok

Release list

Intial Release

Choose a tag to compare

@lucianofedericopereira lucianofedericopereira released this 05 Jul 14:35

A standalone PHP tokenizer in C, built from PHP's own lexer.

Instead of hand-writing (and forever chasing) a PHP grammar, libphptok vendors Zend/zend_language_scanner.l straight from php-src, compiles it free of the Zend runtime behind a small stub layer, and exposes it through a tiny C API. Output matches PHP's PhpToken::tokenize() byte-for-byte, verified per php-src version against the real engine — so you get exact PHP lexing with no PHP runtime, no per-file php subprocess, and no grammar drift.

Pinned baseline: php-8.5.7 (a stable release tag; also the version the differential harness checks against locally).