phunkie / phunkistan
A type checker for phunkie
Requires
- php: ^8.2 || ^8.3 || ^8.4 || ^8.5
- nikic/php-parser: ^5.7
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- phpspec/phpspec: 9.x-dev
- phpstan/phpstan: ^2.2
This package is not auto-updated.
Last update: 2026-08-08 04:28:36 UTC
README
A type checker for phunkie.
It reads .phunkie sources and reports what is wrong with them in phunkie's own
terms, at positions in the file you wrote. It does not read compiled PHP, so
there is no generated line number to leak and no source map to keep honest.
phunkistan src/phunkie # check once phunkistan --watch src/phunkie # check again on every save phunkistan --format=json src/App.phunkie
Status
Early. The first thing being built is the parser, because the compiler's worst failure today is not a type error but silence: phunkiec has no grammar for the language it accepts, so notation it has never heard of is passed through unchanged and becomes PHP that will not parse.
Nothing here checks anything yet.
How it fits
- phunkiec compiles. It runs the grammar only: local, per file, fast, and it refuses to emit when the syntax is wrong, because the output would be broken PHP.
- phunkistan checks. Whole program, and it does not block compilation, because its errors describe valid PHP that will throw later.
One grammar, defined here, used by both.
phunkiec -o=build src/phunkie # must pass, or there is no build phunkistan src/phunkie # must pass, or the build is wrong
Requirements
PHP 8.2, 8.3, 8.4 or 8.5.
Licence
MIT. Copyright © Marcello Duarte.