[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"docs:\u002Fdocs\u002Fgetting-started\u002Finstall":3},"\u003Cp>The compiler, \u003Ccode>phn\u003C\u002Fcode>, is one static binary. In a Composer project the \u003Ccode>phaenon\u002Fphn\u003C\u002Fcode> plugin brings it: the binary for your platform, checked against a SHA-256 the package pins, so that \u003Ccode>composer.lock\u003C\u002Fcode> pins the compiler as it pins every other dependency. Outside Composer you download the binary yourself.\u003C\u002Fp>\n\u003Ch2 id=\"with-composer\">With Composer\u003Ca class=\"docs-anchor\" href=\"#with-composer\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Allow the plugin, then require 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\">composer\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> config\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> allow-plugins.phaenon\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> true\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">composer\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> require\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> phaenon\u002Fphn\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>.\u002Fcomposer.json has been updated\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Running composer update phaenon\u002Fphn\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Loading composer repositories with package information\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Updating dependencies\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Lock file operations: 1 install, 0 updates, 0 removals\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>  - Locking phaenon\u002Fphn (v0.7.2)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Writing lock file\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Installing dependencies from lock file (including require-dev)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Package operations: 1 install, 0 updates, 0 removals\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>  - Downloading phaenon\u002Fphn (v0.7.2)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>  - Installing phaenon\u002Fphn (v0.7.2): Extracting archive\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>…\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Using version ^0.7.2 for phaenon\u002Fphn\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>Composer runs a plugin only once the project allows it. Without the first command, \u003Ccode>composer require --no-interaction\u003C\u002Fcode> stops with &quot;phaenon\u002Fphn contains a Composer plugin which is blocked by your allow-plugins config&quot;; in a terminal, Composer asks instead, and answering yes writes the same setting into \u003Ccode>composer.json\u003C\u002Fcode>:\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:#2A7A4B;--phn-dark:#8FD3A3\">\"config\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">: \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">    \"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">allow-plugins\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">:\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">        \"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">phaenon\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">:\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> true\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>The package is on \u003Ca href=\"https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fphaenon\u002Fphn\">Packagist\u003C\u002Fa>. Its version is the compiler&#39;s: \u003Ccode>phaenon\u002Fphn\u003C\u002Fcode> 0.7.2 brings \u003Ccode>phn\u003C\u002Fcode> 0.7.2.\u003C\u002Fp>\n\u003Ch3 id=\"require-not-require-dev\">\u003Ccode>require\u003C\u002Fcode>, not \u003Ccode>require-dev\u003C\u002Fcode>\u003Ca class=\"docs-anchor\" href=\"#require-not-require-dev\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>An application keeps the compiled PHP out of its repository and builds it where it is installed, so the plugin belongs in \u003Ccode>require\u003C\u002Fcode>. A production install runs without the development packages:\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\">composer\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> install\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> --no-dev\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>With the plugin in \u003Ccode>require\u003C\u002Fcode>, that install compiles the sources as it writes the autoloader. With the plugin in \u003Ccode>require-dev\u003C\u002Fcode>, the same install leaves it out, nothing is compiled, and the autoloader points at an output directory that does not exist.\u003C\u002Fp>\n\u003Cp>The one exception is a library that commits its compiled PHP, so that projects without \u003Ccode>phn\u003C\u002Fcode> can install it: there the plugin is a development tool, in \u003Ccode>require-dev\u003C\u002Fcode> with an exact version. \u003Ca href=\"\u002Fdocs\u002Ftooling\u002Flibraries\">Publishing a library\u003C\u002Fa> covers that case.\u003C\u002Fp>\n\u003Ch3 id=\"what-the-plugin-does\">What the plugin does\u003Ca class=\"docs-anchor\" href=\"#what-the-plugin-does\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>\u003Cstrong>It links \u003Ccode>vendor\u002Fbin\u002Fphn\u003C\u002Fcode>\u003C\u002Fstrong>, a small PHP launcher that runs the binary with your arguments, standard streams and exit status. Use it wherever this documentation writes \u003Ccode>phn\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>It fetches the binary when it is first needed\u003C\u002Fstrong>: at the first autoload dump of a project that has a \u003Ccode>phaenon.json\u003C\u002Fcode>, or at the first run of \u003Ccode>vendor\u002Fbin\u002Fphn\u003C\u002Fcode>, whichever comes first.\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\"> 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>phaenon\u002Fphn: Downloading phn 0.7.2 (phn-darwin-arm64) from https:\u002F\u002Fgithub.com\u002Fphaenonlang\u002Fphaenon\u002Freleases\u002Fdownload\u002Fv0.7.2\u002Fphn-darwin-arm64\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>phn 0.7.2\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>The download comes from the compiler&#39;s GitHub release. The plugin checks it against the SHA-256 that \u003Ccode>phaenon\u002Fphn\u003C\u002Fcode> carries for each platform (\u003Ccode>composer\u002Fchecksums.json\u003C\u002Fcode> in the package) and refuses a file that does not match. It keeps the binary in Composer&#39;s cache, under \u003Ccode>phaenon-phn\u002F&lt;version&gt;\u002F\u003C\u002Fcode>, and installs it as \u003Ccode>vendor\u002Fphaenon\u002Fphn\u002Fbin\u002Fphn\u003C\u002Fcode>. A second project on the same machine takes it from the cache.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>It builds when Composer writes the autoloader.\u003C\u002Fstrong> Every \u003Ccode>composer install\u003C\u002Fcode>, \u003Ccode>composer update\u003C\u002Fcode> and \u003Ccode>composer dump-autoload\u003C\u002Fcode> compiles first the installed packages that have a \u003Ccode>phaenon.json\u003C\u002Fcode>, then the project itself, so that the autoloader is written over outputs that exist:\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>Generating autoload files\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>> phn build\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>1 files compiled, 1 written, 0 files copied, 0 stale outputs removed\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Generated autoload files\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>A project with nothing to build, its own or installed, makes the plugin do nothing: it neither fetches nor runs the binary. A build that fails stops the Composer command, after \u003Ccode>phn\u003C\u002Fcode> has printed what failed.\u003C\u002Fp>\n\u003Ch3 id=\"settings\">Settings\u003Ca class=\"docs-anchor\" href=\"#settings\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The root project&#39;s \u003Ccode>composer.json\u003C\u002Fcode> can change three things. An installed package&#39;s settings are ignored.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>PHN_BINARY=\u002Fpath\u002Fto\u002Fphn\u003C\u002Fcode> in the environment runs another binary, a build from source for example. Nothing is downloaded and no checksum is checked.\u003C\u002Fli>\n\u003Cli>\u003Ccode>&quot;extra&quot;: {&quot;phaenon&quot;: {&quot;binary-url&quot;: &quot;…&quot;}}\u003C\u002Fcode> downloads the binary from a mirror instead of GitHub. The value is a URL template: \u003Ccode>{version}\u003C\u002Fcode> and \u003Ccode>{file}\u003C\u002Fcode> are filled in. phaenon.dev mirrors every release:\u003C\u002Fli>\n\u003C\u002Ful>\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:#2A7A4B;--phn-dark:#8FD3A3\">\"extra\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">: \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">    \"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">phaenon\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">:\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">        \"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">binary-url\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">:\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> \"https:\u002F\u002Fphaenon.dev\u002Freleases\u002F{version}\u002F{file}\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cul>\n\u003Cli>\u003Ccode>&quot;extra&quot;: {&quot;phaenon&quot;: {&quot;build&quot;: false}}\u003C\u002Fcode> leaves the project&#39;s own build to its scripts or CI. Installed packages are still built.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The checksum decides in every case: a mirror serves the same files, and a file that differs from the pinned one is refused.\u003C\u002Fp>\n\u003Ch2 id=\"the-binary-alone\">The binary alone\u003Ca class=\"docs-anchor\" href=\"#the-binary-alone\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Each release has one file per platform:\u003C\u002Fp>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Platform\u003C\u002Fth>\u003Cth>File\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>macOS, Apple silicon\u003C\u002Ftd>\u003Ctd>\u003Ccode>phn-darwin-arm64\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>macOS, Intel\u003C\u002Ftd>\u003Ctd>\u003Ccode>phn-darwin-amd64\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Linux, x86-64\u003C\u002Ftd>\u003Ctd>\u003Ccode>phn-linux-amd64\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Linux, ARM64\u003C\u002Ftd>\u003Ctd>\u003Ccode>phn-linux-arm64\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Windows, x86-64\u003C\u002Ftd>\u003Ctd>\u003Ccode>phn-windows-amd64.exe\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>The Linux binaries are statically linked, so they run on any distribution, Alpine included. The \u003Ca href=\"\u002Fdownload\">download page\u003C\u002Fa> lists every release with the SHA-256 of each file. Download yours, compare the checksum and run 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\">curl\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> -fLO\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> https:\u002F\u002Fphaenon.dev\u002Freleases\u002F0.7.2\u002Fphn-darwin-arm64\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">shasum\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> -a\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> 256\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> phn-darwin-arm64\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>a341381b13e87cfa42bd36c9524a74547eb459cab8fb5b1e11f9215d74d6372f  phn-darwin-arm64\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 style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">chmod\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> +x\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> phn-darwin-arm64\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">.\u002Fphn-darwin-arm64\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>Then put it on your \u003Ccode>PATH\u003C\u002Fcode> under the name \u003Ccode>phn\u003C\u002Fcode>. On Linux, \u003Ccode>sha256sum\u003C\u002Fcode> prints the same checksum. The same sums are in \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fphaenonlang\u002Fphaenon\u002Fblob\u002Fv0.7.2\u002Fcomposer\u002Fchecksums.json\">\u003Ccode>composer\u002Fchecksums.json\u003C\u002Fcode>\u003C\u002Fa> at the release&#39;s tag, and the files are on the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fphaenonlang\u002Fphaenon\u002Freleases\u002Ftag\u002Fv0.7.2\">GitHub release\u003C\u002Fa> too. A file at phaenon.dev never changes once published: a new build is a new version.\u003C\u002Fp>\n\u003Ch2 id=\"from-source\">From source\u003Ca class=\"docs-anchor\" href=\"#from-source\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>With Go 1.27 or newer:\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\">go\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> install\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> github.com\u002Fphaenonlang\u002Fphaenon\u002Fcmd\u002Fphn@v0.7.2\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>A build from source calls itself \u003Ccode>dev\u003C\u002Fcode>: \u003Ccode>phn version\u003C\u002Fcode> prints \u003Ccode>phn dev\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>The release files are reproducible. In a clone of the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fphaenonlang\u002Fphaenon\">compiler&#39;s repository\u003C\u002Fa> at the release&#39;s tag, one command builds all seven with the Go toolchain \u003Ccode>go.mod\u003C\u002Fcode> pins and compares them with the checksums the plugin pins:\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\">go\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> run\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> .\u002Ftools\u002Frelease\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> -version\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> 0.7.2\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> -out\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> dist\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> -verify\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>toolchain go1.27.3\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>cdeac50989c9d4abf598f6ece4a11b3c7e7daae18a1f71cdc4c22f03c2861988  phn-darwin-amd64\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>a341381b13e87cfa42bd36c9524a74547eb459cab8fb5b1e11f9215d74d6372f  phn-darwin-arm64\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>…\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>7 assets match composer\u002Fchecksums.json\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Ch2 id=\"php-versions\">PHP versions\u003Ca class=\"docs-anchor\" href=\"#php-versions\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>The code \u003Ccode>phn\u003C\u002Fcode> writes\u003C\u002Fstrong> runs on PHP 8.5 or 8.6, the project&#39;s \u003Cstrong>target\u003C\u002Fstrong>. The target is \u003Ccode>&quot;php&quot;\u003C\u002Fcode> in \u003Ccode>phaenon.json\u003C\u002Fcode>, else the lowest version \u003Ccode>composer.json\u003C\u002Fcode>&#39;s \u003Ccode>require.php\u003C\u002Fcode> admits, else PHP 8.5 with a warning. \u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fconfiguration\">\u003Ccode>phaenon.json\u003C\u002Fcode>\u003C\u002Fa> says more.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The plugin\u003C\u002Fstrong> runs under the PHP that runs Composer: PHP 8.3 or newer, with Composer 2.3 or newer.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The checker\u003C\u002Fstrong> reads the extensions of the local \u003Ccode>php\u003C\u002Fcode> (\u003Ccode>PHN_PHP\u003C\u002Fcode> names another binary), which should be as new as the target. An older one makes \u003Ccode>phn check\u003C\u002Fcode> warn, \u003Ccode>P4012\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Ccode>phn\u003C\u002Fcode> itself is a Go program, and the signatures of PHP&#39;s own functions and classes are built into it. Without a \u003Ccode>php\u003C\u002Fcode> to ask, it knows the extensions that ship with PHP&#39;s source and warns that it read no others, \u003Ccode>P4007\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"next\">Next\u003Ca class=\"docs-anchor\" href=\"#next\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ca href=\"\u002Fdocs\u002Fgetting-started\u002Ffirst-project\">A first project\u003C\u002Fa> takes an empty Composer project to a class written in Phaenon, tested and analysed. To bring an existing project over, see \u003Ca href=\"\u002Fdocs\u002Fgetting-started\u002Fmigrate\">Migrate a PHP project\u003C\u002Fa>.\u003C\u002Fp>\n",1794925619135]