Zephir code parser.
Zephir Parser is a code parser, delivered as a C extension for the PHP language.
License: MIT
| Version | Release | Download |
| 2.0.4 | 2026-06-04 | zephir_parser-2.0.4.tgz |
| 2.0.3 | 2026-06-01 | zephir_parser-2.0.3.tgz |
| 2.0.2 | 2026-05-28 | zephir_parser-2.0.2.tgz |
| 2.0.1 | 2026-05-18 | zephir_parser-2.0.1.tgz |
| 2.0.0 | 2026-04-05 | zephir_parser-2.0.0.tgz |
| Version | Message |
| 2.0.4 |
### Fixed - A `-` glued to a digit right after a value (e.g. `len-1`, `5-1`, `arr[0]-1`, `len -1`) is now scanned as the binary subtraction operator instead of the sign of a negative literal, which previously produced a `Syntax error`. Unary negative literals (after `=`, `(`, `,`, `return`, etc.) are unchanged, so parameter defaults, constants and array keys keep their negative-literal AST ([zephir-lang/zephir#2011](https://github.com/zephir-lang/zephir/issues/2011)). |
| 2.0.3 |
### Fixed - `instanceof` now binds tighter than logical not, matching PHP — `!a instanceof b` parses as `!(a instanceof b)` instead of `(!a) instanceof b`. |
| 2.0.2 |
### Added - Added grammar rules for variadic parameters (`...name` and `type ...name`). The parameter AST node now carries a `"variadic" => 1` flag so the compiler can generate variadic functions/methods ([zephir-lang/zephir#2025](https://github.com/zephir-lang/zephir/issues/2025)). |
| 2.0.1 |
### Added - Added grammar rule for ` ([zephir-lang/zephir#2505](https://github.com/zephir-lang/zephir/issues/2505)). |
| 2.0.0 |
Sun, Apr 05, 2026 - Zephir Parser 2.0.0 = Added: - Added support for array destructuring assignment syntax `let [a, b, c] = expr;`, matching PHP 7.1+ short list convention. Supports skipped slots (`let [a, , c] = arr;`) and all-caps variable names. Parser-only; compiler code generation tracked in zephir#2496 (#18) - Added `docs/grammar.ebnf` containing the complete Zephir grammar in EBNF notation for railroad diagram visualization (#106) = Fixed: - All-uppercase identifiers (e.g. `RBF`, `LU`, `A`) are now accepted as class names, method names, function names, variable names, property names, and parameters. Previously the scanner emitted XX_T_CONSTANT for any all-caps token and grammar rules for name positions only accepted XX_T_IDENTIFIER, causing a syntax error (#39) |