[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"docs:\u002Fdocs\u002Ftooling\u002Fcli":3},"\u003Cp>\u003Ccode>phn\u003C\u002Fcode> is the Phaenon compiler: one static binary that type-checks \u003Ccode>.phn\u003C\u002Fcode> files, compiles them to\nPHP, lays them out, and maps positions in the compiled PHP back to the source. In a Composer\nproject the \u003Ccode>phaenon\u002Fphn\u003C\u002Fcode> plugin installs the release \u003Ccode>composer.lock\u003C\u002Fcode> pins as \u003Ccode>vendor\u002Fbin\u002Fphn\u003C\u002Fcode>\n(\u003Ca href=\"\u002Fdocs\u002Fgetting-started\u002Finstall\">Install\u003C\u002Fa>).\u003C\u002Fp>\n\u003Cp>The examples on this page write \u003Ccode>vendor\u002Fbin\u002Fphn\u003C\u002Fcode> where they run in a project. Inside a Composer\nscript, \u003Ccode>vendor\u002Fbin\u003C\u002Fcode> is on the \u003Ccode>PATH\u003C\u002Fcode>, so a script runs \u003Ccode>phn build\u003C\u002Fcode> as it runs \u003Ccode>phpunit\u003C\u002Fcode>. Every\ncommand that works on a project reads \u003Ccode>phaenon.json\u003C\u002Fcode> from the working directory, so run them from\nthe project&#39;s root (\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fconfiguration\">\u003Ccode>phaenon.json\u003C\u002Fcode>\u003C\u002Fa>).\u003C\u002Fp>\n\u003Ch2 id=\"the-commands\">The commands\u003Ca class=\"docs-anchor\" href=\"#the-commands\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Command\u003C\u002Fth>\u003Cth>What it does\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ca href=\"#phn-build\">\u003Ccode>phn build\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>Type-checks and compiles the roots into their output directories\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ca href=\"#phn-check\">\u003Ccode>phn check\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>Type-checks and writes nothing\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ca href=\"#phn-fmt\">\u003Ccode>phn fmt\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>Lays the \u003Ccode>.phn\u003C\u002Fcode> out in Phaenon&#39;s layout, then runs the project&#39;s fixer\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ca href=\"#phn-fix\">\u003Ccode>phn fix\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>Runs php-cs-fixer or Rector on the outputs and carries their changes back into the \u003Ccode>.phn\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ca href=\"#phn-trace\">\u003Ccode>phn trace\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>Rewrites positions in compiled files, in text or in a report, as \u003Ccode>.phn\u003C\u002Fcode> positions\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ca href=\"#phn-watch\">\u003Ccode>phn watch\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>Checks and builds each time a file of the project changes\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ca href=\"#phn-lsp\">\u003Ccode>phn lsp\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>The language server an editor starts\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ca href=\"#phn-migrate\">\u003Ccode>phn migrate\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>Rewrites \u003Ccode>.php\u003C\u002Fcode> files as \u003Ccode>.phn\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ca href=\"#phn-version-and-phn-help\">\u003Ccode>phn version\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>Prints the release\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>phn\u003C\u002Fcode> without a command prints the usage on standard error and exits with status 2; \u003Ccode>phn help\u003C\u002Fcode>\n(also \u003Ccode>-h\u003C\u002Fcode>, \u003Ccode>--help\u003C\u002Fcode>) prints it on standard output. \u003Ccode>phn &lt;command&gt; --help\u003C\u002Fcode> lists the command&#39;s\noptions. An option \u003Ccode>phn\u003C\u002Fcode> does not know ends the command with status 2 and the command&#39;s options.\u003C\u002Fp>\n\u003Ch2 id=\"phn-build\">phn build\u003Ca class=\"docs-anchor\" href=\"#phn-build\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phn build [--out DIR] [--check] [--emit-on-error] [--exclude PATH]... [&#x3C;path>...]\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>phn build --vendor\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Option\u003C\u002Fth>\u003Cth>Effect\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>--check\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Writes nothing; fails when an output is missing, stale or has no source left\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--emit-on-error\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Writes the output of a file with type errors too; the exit status still reports them\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--exclude PATH\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Leaves this path&#39;s findings unreported; repeatable\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--out DIR\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Writes the outputs under \u003Ccode>DIR\u003C\u002Fcode> instead of beside the sources\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--vendor\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Compiles the installed Composer packages that carry a \u003Ccode>phaenon.json\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Without paths, \u003Ccode>phn build\u003C\u002Fcode> compiles the roots \u003Ccode>phaenon.json\u003C\u002Fcode> names. Each root compiles into its\noutput directory, every other file under the root is copied there, and an output whose source is\ngone is removed:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">vendor\u002Fbin\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> build\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>5 files compiled, 5 written, 0 files copied, 0 stale outputs removed\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>The build checks first. A file with an error is not written, its findings go to standard error,\nand the command fails; the output a previous build wrote for that file stays as it was:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>src\u002FReceipt.phn:8:16: error P2202: App\\Receipt::total() should return string but returns int\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>    8 |         return $sum;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>      |                ^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>1 of 6 files failed to compile\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>\u003Ccode>--emit-on-error\u003C\u002Fcode> writes such a file all the same, which is how a code base that is still fixing\nits findings keeps running (\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fchecker#adopting-the-checker\">The type checker\u003C\u002Fa>).\u003C\u002Fp>\n\u003Cp>With paths, \u003Ccode>phn build\u003C\u002Fcode> compiles those files, or the \u003Ccode>.phn\u003C\u002Fcode> under those directories. In a project\nthey go to their place in the output directory, but nothing is copied and nothing removed. Without\na \u003Ccode>phaenon.json\u003C\u002Fcode>, \u003Ccode>Foo.phn\u003C\u002Fcode> compiles to \u003Ccode>Foo.php\u003C\u002Fcode> beside it, or under \u003Ccode>--out DIR\u003C\u002Fcode> at the same\nrelative path:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">phn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> build\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> --out\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> build\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> OutOfStock.phn\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>1 files compiled, 1 written\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>\u003Ccode>--check\u003C\u002Fcode> compares instead of writing. Each output that differs is named on standard error:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>.src\u002FCurrencyMismatch.php: stale or missing\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>1 outputs are stale, 0 copies are stale, 0 outputs have no source; run `phn build`\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>Combined with \u003Ccode>--emit-on-error\u003C\u002Fcode>, a file with errors passes when its output is what such a build\nwrites. \u003Ccode>--vendor\u003C\u002Fcode> takes no paths and no other option; it builds the installed packages as the\nComposer plugin does at every autoload dump (\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Flibraries\">Publishing a library\u003C\u002Fa>).\u003C\u002Fp>\n\u003Cp>The exit status is 0 when every file compiled, 1 when one failed, when \u003Ccode>--check\u003C\u002Fcode> finds a\ndifference, or when a library&#39;s \u003Ccode>composer.json\u003C\u002Fcode> lacks the \u003Ccode>conflict\u003C\u002Fcode> its \u003Ccode>phaenon.json\u003C\u002Fcode> asks for\n(\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Flibraries#the-conflict-the-build-checks\">Publishing a library\u003C\u002Fa>).\u003C\u002Fp>\n\u003Ch2 id=\"phn-check\">phn check\u003Ca class=\"docs-anchor\" href=\"#phn-check\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phn check [--format=F] [--no-deprecations] [--exclude PATH]... [&#x3C;path>...]\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Option\u003C\u002Fth>\u003Cth>Effect\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>--format\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>text\u003C\u002Fcode> (the default), \u003Ccode>json\u003C\u002Fcode>, \u003Ccode>github\u003C\u002Fcode> or \u003Ccode>checkstyle\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--json\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>The same as \u003Ccode>--format=json\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--no-deprecations\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Leaves out the findings about what PHP deprecates\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--exclude PATH\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Skips this path; repeatable\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Without paths it checks the roots of \u003Ccode>phaenon.json\u003C\u002Fcode>, minus its \u003Ccode>exclude\u003C\u002Fcode> list. A \u003Ccode>.php\u003C\u002Fcode> file under\na root is checked too, as PHP, unless a \u003Ccode>.phn\u003C\u002Fcode> of the same name stands beside it.\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">vendor\u002Fbin\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> check\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>src\u002FExample.phn:13:13: warning P2406: private method App\\Basket::label() is never used\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>   13 |     private label(): string => 'basket';\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>      |             ^^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>src\u002FExample.phn:16:46: error P2202: function App\\checkout() should return string but returns int\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>   16 | function checkout(Basket $basket): string => $basket->total();\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>      |                                              ^^^^^^^^^^^^^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>1 files checked: 1 errors, 1 warnings\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>In the text format the findings go to standard error and the summary to standard output. The exit\nstatus is 1 when there is an error and 0 otherwise, warnings included. The formats, the codes and\nwhat the checker reads are on \u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fchecker\">The type checker\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"phn-fmt\">phn fmt\u003Ca class=\"docs-anchor\" href=\"#phn-fmt\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phn fmt [--check] [&#x3C;path>...]\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>phn fmt --stdin\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Option\u003C\u002Fth>\u003Cth>Effect\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>--check\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Writes nothing; fails when either layer would change a file\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--stdin\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Lays out standard input onto standard output, in Phaenon&#39;s layout alone\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>phn fmt\u003C\u002Fcode> formats in two layers: Phaenon&#39;s layout, then the project&#39;s php-cs-fixer through\n\u003Ccode>phn fix\u003C\u002Fcode>. Without paths it formats the roots; a directory stands for the \u003Ccode>.phn\u003C\u002Fcode> under it.\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">vendor\u002Fbin\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> fmt\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>4 files formatted, 1 changed in Phaenon's layout\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>PHP CS Fixer 3.95.30 Adalbertus by Fabien Potencier, Dariusz Ruminski and contributors.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>…\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>php-cs-fixer changed 1 files: 3 changes carried back to 1 sources, 0 in text the compiler wrote\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>after the rebuild, php-cs-fixer changes nothing\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>The exit status is 1 when \u003Ccode>--check\u003C\u002Fcode> finds a change, when a file does not parse (the others are\nformatted), or when the fixer still changes something; when the fixer itself fails, \u003Ccode>phn fmt\u003C\u002Fcode>\nexits with the fixer&#39;s status. \u003Ccode>--stdin\u003C\u002Fcode> takes no paths and exits with 0 unless the input does\nnot parse. The layers are described on \u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fformatting\">Formatting and fixers\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"phn-fix\">phn fix\u003Ca class=\"docs-anchor\" href=\"#phn-fix\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phn fix [--check] -- &#x3C;command> [&#x3C;arg>...]\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Option\u003C\u002Fth>\u003Cth>Effect\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>--check\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Reports every change the tool makes at its \u003Ccode>.phn\u003C\u002Fcode> line, and writes no source\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>phn fix\u003C\u002Fcode> builds the project, runs the command on the outputs, carries the changes the tool made\nback into the \u003Ccode>.phn\u003C\u002Fcode>, rebuilds, and runs the tool again until nothing more is carried (three rounds\nat most):\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">vendor\u002Fbin\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> fix\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> --\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> vendor\u002Fbin\u002Frector\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> process\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>rector changed 1 files: 2 changes carried back to 1 sources, 0 in text the compiler wrote\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>after the rebuild, rector changes nothing\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>The exit status is the tool&#39;s when the tool fails, 1 when changes are left (with \u003Ccode>--check\u003C\u002Fcode>, when\nthere is any change), and 0 otherwise. It needs a \u003Ccode>phaenon.json\u003C\u002Fcode> with roots. What is carried and\nwhat is not is on \u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fformatting#php-tools-through-phn-fix\">Formatting and fixers\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"phn-trace\">phn trace\u003Ca class=\"docs-anchor\" href=\"#phn-trace\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phn trace [--root PREFIX=LOCAL]... [&#x3C;text>...]\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Option\u003C\u002Fth>\u003Cth>Effect\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>--root PREFIX=LOCAL\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Reads a path under \u003Ccode>PREFIX\u003C\u002Fcode> from \u003Ccode>LOCAL\u003C\u002Fcode>; repeatable\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>phn trace\u003C\u002Fcode> rewrites positions in compiled files as \u003Ccode>.phn\u003C\u002Fcode> positions: \u003Ccode>file.php:42\u003C\u002Fcode>,\n\u003Ccode>file.php(42)\u003C\u002Fcode> and \u003Ccode>file.php on line 42\u003C\u002Fcode>, wherever the file ends with a line map. Everything else\npasses through unchanged. It reads its arguments, joined by spaces, or standard input without\nthem:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">vendor\u002Fbin\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> trace\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> \".src\u002FInventory.php:28\"\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>src\u002FInventory.phn:14\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>On standard input it also reads GitHub workflow commands, and Checkstyle, JUnit, Clover and\nCobertura reports, which it writes back as the same report. It exits with 0. Its uses are on\n\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fdebugging\">Line maps and debugging\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"phn-watch\">phn watch\u003Ca class=\"docs-anchor\" href=\"#phn-watch\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phn watch [--no-build] [--interval D]\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Option\u003C\u002Fth>\u003Cth>Effect\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>--no-build\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Checks only; writes no outputs\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--interval\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>How often to look for changes (default \u003Ccode>300ms\u003C\u002Fcode>)\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>phn watch\u003C\u002Fcode> checks and builds the project around the working directory at start, then each time\none of its files changes, until you stop it with Ctrl-C. It takes no paths: it watches the roots.\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>5 files checked: 0 errors, 0 warnings\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>5 files compiled, 0 outputs written, 0 withheld (0.3s)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>phn watch: waiting for changes (Ctrl-C to stop)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>See \u003Ca href=\"\u002Fdocs\u002Ftooling\u002Flocal-development#building-as-you-work\">Local development\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"phn-lsp\">phn lsp\u003Ca class=\"docs-anchor\" href=\"#phn-lsp\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phn lsp\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>The language server of the project around the working directory, speaking the Language Server\nProtocol on standard input and output. Editors start it; \u003Ccode>--stdio\u003C\u002Fcode> is accepted and is the only\ntransport. It moves to the nearest directory above the working directory that holds a\n\u003Ccode>phaenon.json\u003C\u002Fcode>, else a \u003Ccode>composer.json\u003C\u002Fcode>, and serves that project. See \u003Ca href=\"\u002Fdocs\u002Ftooling\u002Feditors\">Editors\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"phn-migrate\">phn migrate\u003Ca class=\"docs-anchor\" href=\"#phn-migrate\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phn migrate [--keep-docblocks] [--keep-public] [--keep-layout] [--keep-calls] [--pipes=N] [--list-types] [--php X.Y] &#x3C;path>...\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Option\u003C\u002Fth>\u003Cth>Effect\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>--keep-docblocks\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Leaves generic docblocks as they are\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--keep-public\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Keeps the \u003Ccode>public\u003C\u002Fcode> of a method lifted out of \u003Ccode>function\u003C\u002Fcode>, and before \u003Ccode>private(set)\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--keep-layout\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Keeps braces, docblocks and bodies as they are\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--keep-calls\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Keeps nested calls as they are, with no pipelines\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--pipes=N\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Writes chains of this many nested calls or more as pipelines (default 3)\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--list-types\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Types bare \u003Ccode>array\u003C\u002Fcode> declarations as \u003Ccode>list&lt;T&gt;\u003C\u002Fcode> or \u003Ccode>map&lt;K, V&gt;\u003C\u002Fcode> where every value they hold says so\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>--php X.Y\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Writes this target into \u003Ccode>phaenon.json\u003C\u002Fcode>, creating the file if needed\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>phn migrate\u003C\u002Fcode> rewrites \u003Ccode>Foo.php\u003C\u002Fcode> as \u003Ccode>Foo.phn\u003C\u002Fcode> and removes the \u003Ccode>.php\u003C\u002Fcode>. It also runs on \u003Ccode>.phn\u003C\u002Fcode>\nfiles, to lift what an earlier run left.\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">phn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> migrate\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> --php\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> 8.5\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> src\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phaenon.json: target PHP 8.5\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>1 files migrated, 0 skipped, 0 .phn files updated, 0 docblock tags kept\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>1 @throws lifted, 1 bodies written as =>, 1 braces moved up, 0 class braces moved down, 0 empty bodies written as {}, 0 docblocks collapsed; 34 lines became 15\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>0 chains as pipelines, 0 left as calls\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>A \u003Ccode>phaenon.json\u003C\u002Fcode> that \u003Ccode>--php\u003C\u002Fcode> creates states only the target; add the roots before you build.\nThe walk through a whole project is \u003Ca href=\"\u002Fdocs\u002Fgetting-started\u002Fmigrate\">Migrate a PHP project\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"phn-version-and-phn-help\">phn version and phn help\u003Ca class=\"docs-anchor\" href=\"#phn-version-and-phn-help\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">vendor\u002Fbin\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> version\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phn 0.7.2\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>A binary built from source calls itself \u003Ccode>dev\u003C\u002Fcode>. \u003Ccode>phn help\u003C\u002Fcode> prints the usage.\u003C\u002Fp>\n\u003Ch2 id=\"for-the-compilers-own-development\">For the compiler&#39;s own development\u003Ca class=\"docs-anchor\" href=\"#for-the-compilers-own-development\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ccode>phn lex [--php] &lt;file&gt;\u003C\u002Fcode> prints the token stream; \u003Ccode>--php\u003C\u002Fcode> reads plain PHP with its open tag.\u003C\u002Fli>\n\u003Cli>\u003Ccode>phn print [--php] &lt;file&gt;\u003C\u002Fcode> parses and pretty-prints.\u003C\u002Fli>\n\u003Cli>\u003Ccode>phn stdlib --out DIR [--check]\u003C\u002Fcode> writes the PHP the \u003Ccode>phaenon\u002Fdebug\u003C\u002Fcode> package ships.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"exit-status\">Exit status\u003Ca class=\"docs-anchor\" href=\"#exit-status\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Status\u003C\u002Fth>\u003Cth>Meaning\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>0\u003C\u002Ftd>\u003Ctd>Done; \u003Ccode>phn check\u003C\u002Fcode> found warnings at most\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>1\u003C\u002Ftd>\u003Ctd>An error: a finding of severity error, a file that did not compile, a stale output under \u003Ccode>--check\u003C\u002Fcode>, a change left by \u003Ccode>fmt\u003C\u002Fcode> or \u003Ccode>fix\u003C\u002Fcode>, or a problem with \u003Ccode>phaenon.json\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>2\u003C\u002Ftd>\u003Ctd>No command, an unknown command, or an unknown option\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>126\u003C\u002Ftd>\u003Ctd>\u003Ccode>vendor\u002Fbin\u002Fphn\u003C\u002Fcode> found the binary and could not run it\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>127\u003C\u002Ftd>\u003Ctd>\u003Ccode>vendor\u002Fbin\u002Fphn\u003C\u002Fcode> has no binary and could not fetch one\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>phn fmt\u003C\u002Fcode> and \u003Ccode>phn fix\u003C\u002Fcode> pass on the status of a fixer that fails.\u003C\u002Fp>\n\u003Ch2 id=\"environment-variables\">Environment variables\u003Ca class=\"docs-anchor\" href=\"#environment-variables\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Variable\u003C\u002Fth>\u003Cth>Read by\u003C\u002Fth>\u003Cth>Effect\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>PHN_BINARY\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>vendor\u002Fbin\u002Fphn\u003C\u002Fcode>, the Composer plugin, the editor plugins\u003C\u002Ftd>\u003Ctd>Runs this binary instead of the pinned one\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>PHN_PHP\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>phn\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>The \u003Ccode>php\u003C\u002Fcode> that \u003Ccode>phn\u003C\u002Fcode> asks for the extensions it has loaded (default: \u003Ccode>php\u003C\u002Fcode> on the \u003Ccode>PATH\u003C\u002Fcode>)\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>phn\u003C\u002Fcode> reads the extensions beyond php-src&#39;s from a local \u003Ccode>php\u003C\u002Fcode>, which should be as new as the\ntarget: for an 8.6 target an 8.5 \u003Ccode>php\u003C\u002Fcode> gives warning \u003Ccode>P4012\u003C\u002Fcode> (\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fconfiguration#the-php-target\">\u003Ccode>phaenon.json\u003C\u002Fcode>\u003C\u002Fa>).\u003C\u002Fp>\n",1794925619565]