[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"docs:\u002Fdocs\u002Flanguage\u002Fremoved":3},"\u003Cp>A \u003Ccode>.phn\u003C\u002Fcode> file is PHP, minus a short list of constructs that defeat a type checker or that PHP\nkeeps only for compatibility: the open tag, dynamic scope, the alternative syntax, a few old\nspellings, tabs and untyped declarations. Each is a compile error with its own message, and most\nhave a one-line replacement. Nothing is removed from PHP itself: PHP files in the same project,\nand the vendor code they call, use whatever PHP allows.\u003C\u002Fp>\n\u003Ch2 id=\"at-a-glance\">At a glance\u003Ca class=\"docs-anchor\" href=\"#at-a-glance\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"docs-example\">\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cfigcaption class=\"docs-code-head\">\u003Cspan class=\"docs-code-label\">you write\u003C\u002Fspan>\u003C\u002Ffigcaption>\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:#8F5E00;--phn-dark:#F2B43F\">namespace\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> App\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">final\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> class\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> Settings\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:#0D5F78;--phn-dark:#6FC3DF\">    var\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $cache \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\">=\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> [];\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">    load\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">string\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $file\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">):\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> array\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">mixed\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:#8F5E00;--phn-dark:#F2B43F\">        global\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $config\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">        extract\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">$config\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">        return\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\"> compact\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\">'file'\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>\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\u003Cfigure class=\"docs-code phn-code-surface docs-code-diag\">\u003Cfigcaption class=\"docs-code-head\">\u003Cspan class=\"docs-code-file\">$ phn check\u003C\u002Fspan>\u003Cspan class=\"docs-code-label\">exit 1\u003C\u002Fspan>\u003C\u002Ffigcaption>\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"phn-diag\">\u003Ccode>\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:5:5\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P1001\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">`var` is not available in Phaenon; use public\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    5 |\u003C\u002Fspan>     var $cache = [];\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>     \u003Cspan class=\"diag-caret\">^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:5:9\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P2516\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">property App\\Settings::$cache has no type\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    5 |\u003C\u002Fspan>     var $cache = [];\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>         \u003Cspan class=\"diag-caret\">^^^^^^^^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:8:9\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P1001\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">global is not available in Phaenon; use explicit parameters or a service\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    8 |\u003C\u002Fspan>         global $config;\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>         \u003Cspan class=\"diag-caret\">^^^^^^^^^^^^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:9:9\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P1001\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">extract() is not available in Phaenon; use explicit assignments\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    9 |\u003C\u002Fspan>         extract($config);\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>         \u003Cspan class=\"diag-caret\">^^^^^^^^^^^^^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:11:16\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P1001\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">compact() is not available in Phaenon; use an explicit array literal\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">   11 |\u003C\u002Fspan>         return compact('file');\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>                \u003Cspan class=\"diag-caret\">^^^^^^^^^^^^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-summary\">1 files checked: 5 errors, 0 warnings\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003C\u002Fdiv>\n\u003Ch2 id=\"the-list\">The list\u003Ca class=\"docs-anchor\" href=\"#the-list\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Construct\u003C\u002Fth>\u003Cth>Reported as\u003C\u002Fth>\u003Cth>Write instead\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>&lt;?php\u003C\u002Fcode> at the start\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1000\u003C\u002Fcode>, a syntax error\u003C\u002Ftd>\u003Ctd>nothing: a \u003Ccode>.phn\u003C\u002Fcode> file is code from its first byte\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>?&gt;\u003C\u002Fcode> and inline HTML\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1000\u003C\u002Fcode>, a syntax error\u003C\u002Ftd>\u003Ctd>a template in a separate file\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>global $x\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1001\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>a parameter, a constructor argument or a service\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>goto\u003C\u002Fcode> and labels\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1001\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>loops, \u003Ccode>break\u003C\u002Fcode>, \u003Ccode>continue\u003C\u002Fcode>, early returns\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>eval()\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1001\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>code generated at build time\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>extract()\u003C\u002Fcode>, \u003Ccode>compact()\u003C\u002Fcode>, \u003Ccode>get_defined_vars()\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1001\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>explicit assignments and array literals\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>$$name\u003C\u002Fcode>, \u003Ccode>${&#39;name&#39;}\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1001\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>a \u003Ccode>map&lt;string, mixed&gt;\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>&quot;${name}&quot;\u003C\u002Fcode> interpolation\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1001\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>&quot;{$name}&quot;\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>if: … endif;\u003C\u002Fcode> and the other alternative syntax (\u003Ccode>while\u003C\u002Fcode>, \u003Ccode>for\u003C\u002Fcode>, \u003Ccode>foreach\u003C\u002Fcode>, \u003Ccode>switch\u003C\u002Fcode>, \u003Ccode>declare\u003C\u002Fcode>)\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1001\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>braces\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>var $x\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1001\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>public $x\u003C\u002Fcode>, with a type\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>list($a, $b) = …\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1001\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>[$a, $b] = …\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>a tab outside a string or a comment&#39;s text\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1005\u003C\u002Fcode>, once per file\u003C\u002Ftd>\u003Ctd>spaces\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>a parameter, return or property without a type, a bare \u003Ccode>array\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>P2516\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>the type; \u003Ccode>mixed\u003C\u002Fcode> and \u003Ccode>array&lt;mixed&gt;\u003C\u002Fcode> when that is what you mean\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>fun\u003C\u002Fcode>, \u003Ccode>is\u003C\u002Fcode>, \u003Ccode>as\u003C\u002Fcode>, \u003Ccode>as?\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1001\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>a method without a keyword; PHP&#39;s own type tests\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>THROWS\u003C\u002Fcode>, \u003Ccode>TYPE\u003C\u002Fcode>, \u003Ccode>List&lt;int&gt;\u003C\u002Fcode>, \u003Ccode>(BYTES)\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>P1006\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>\u003Ccode>throws\u003C\u002Fcode>, \u003Ccode>type\u003C\u002Fcode>, \u003Ccode>list&lt;int&gt;\u003C\u002Fcode>, \u003Ccode>(bytes)\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>P1001\u003C\u002Fcode> and \u003Ccode>P1006\u003C\u002Fcode> messages say what to write instead. \u003Ccode>P1000\u003C\u002Fcode> is the code of every syntax error,\nwhich stops the check of that file at the first one.\u003C\u002Fp>\n\u003Ch2 id=\"the-open-tag-and-inline-html\">The open tag and inline HTML\u003Ca class=\"docs-anchor\" href=\"#the-open-tag-and-inline-html\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>A \u003Ccode>.phn\u003C\u002Fcode> file is code from byte 0. It has no \u003Ccode>&lt;?php\u003C\u002Fcode>, no closing \u003Ccode>?&gt;\u003C\u002Fcode>, and no HTML outside the\ntags; \u003Ccode>declare(strict_types=1)\u003C\u002Fcode> is implied, and the compiler writes it into every output. A\ntemplate stays a PHP or Twig file of its own.\u003C\u002Fp>\n\u003Ch2 id=\"dynamic-scope\">Dynamic scope\u003Ca class=\"docs-anchor\" href=\"#dynamic-scope\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>global\u003C\u002Fcode>, \u003Ccode>extract()\u003C\u002Fcode>, \u003Ccode>compact()\u003C\u002Fcode>, \u003Ccode>get_defined_vars()\u003C\u002Fcode>, variable variables and \u003Ccode>eval()\u003C\u002Fcode> make a\nvariable&#39;s existence or its type depend on run-time data, which no checker can follow. Each\nhas a direct replacement: pass what a function needs, build arrays with literals, and use a map\nwhere the keys are data.\u003C\u002Fp>\n\u003Ch2 id=\"old-spellings\">Old spellings\u003Ca class=\"docs-anchor\" href=\"#old-spellings\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The alternative syntax (\u003Ccode>if (…): … endif;\u003C\u002Fcode>), \u003Ccode>var\u003C\u002Fcode> and \u003Ccode>list()\u003C\u002Fcode> are PHP that has a shorter or\nmore common form. Phaenon keeps one form of each: braces, a visibility, and \u003Ccode>[…]\u003C\u002Fcode>\ndestructuring.\u003C\u002Fp>\n\u003Cp>The long casts are the same case. \u003Ccode>(integer)\u003C\u002Fcode>, \u003Ccode>(boolean)\u003C\u002Fcode>, \u003Ccode>(double)\u003C\u002Fcode> and \u003Ccode>(binary)\u003C\u002Fcode>, which\nPHP 8.5 deprecates, and \u003Ccode>(real)\u003C\u002Fcode> and \u003Ccode>(unset)\u003C\u002Fcode>, which PHP 8 refuses, are \u003Ccode>P1001\u003C\u002Fcode>. Write \u003Ccode>(int)\u003C\u002Fcode>,\n\u003Ccode>(bool)\u003C\u002Fcode>, \u003Ccode>(float)\u003C\u002Fcode> and \u003Ccode>(string)\u003C\u002Fcode>; \u003Ccode>phn fmt\u003C\u002Fcode> rewrites the long ones. \u003Ccode>(unset) $x\u003C\u002Fcode> has no cast to\nbecome: write \u003Ccode>null\u003C\u002Fcode> for its value, or \u003Ccode>unset($x);\u003C\u002Fcode> as a statement.\u003C\u002Fp>\n\u003Cdiv class=\"docs-example\">\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cfigcaption class=\"docs-code-head\">\u003Cspan class=\"docs-code-label\">you write\u003C\u002Fspan>\u003C\u002Ffigcaption>\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:#8F5E00;--phn-dark:#F2B43F\">namespace\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> App\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">function\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\"> size\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">string\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $input\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">):\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> int\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">    return\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> (\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">integer\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">)\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $input\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>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface docs-code-diag\">\u003Cfigcaption class=\"docs-code-head\">\u003Cspan class=\"docs-code-file\">$ phn check\u003C\u002Fspan>\u003Cspan class=\"docs-code-label\">exit 1\u003C\u002Fspan>\u003C\u002Ffigcaption>\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"phn-diag\">\u003Ccode>\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:4:12\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P1001\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">(integer) is not available in Phaenon; use (int), which phn fmt writes\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    4 |\u003C\u002Fspan>     return (integer) $input;\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>            \u003Cspan class=\"diag-caret\">^^^^^^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-summary\">1 files checked: 1 errors, 0 warnings\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003C\u002Fdiv>\n\u003Ch2 id=\"tabs\">Tabs\u003Ca class=\"docs-anchor\" href=\"#tabs\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Phaenon code is indented with spaces, as PER Coding Style requires. A tab outside a string&#39;s\ncontent or a comment&#39;s text is \u003Ccode>P1005\u003C\u002Fcode>, reported once per file at the first tab. Tabs inside\nstrings, heredocs and comments are left alone.\u003C\u002Fp>\n\u003Ch2 id=\"untyped-declarations\">Untyped declarations\u003Ca class=\"docs-anchor\" href=\"#untyped-declarations\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Every parameter, return and property has a type, and a bare \u003Ccode>array\u003C\u002Fcode> names what it holds. \u003Ccode>mixed\u003C\u002Fcode>\nis a type you write when you mean it, never one the checker assumes:\u003C\u002Fp>\n\u003Cdiv class=\"docs-example\">\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cfigcaption class=\"docs-code-head\">\u003Cspan class=\"docs-code-label\">you write\u003C\u002Fspan>\u003C\u002Ffigcaption>\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:#8F5E00;--phn-dark:#F2B43F\">namespace\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> App\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">final\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> class\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> Counter\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:#8F5E00;--phn-dark:#F2B43F\">    public\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $count \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\">=\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> 0\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">    add\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">$step\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:#1F2127;--phn-dark:#E2E3E7\">        $\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-light-font-style:italic;--phn-dark:#E2E3E7;--phn-dark-font-style:italic\">this\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">->\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">count \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\">+=\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $step\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>\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\u003Cfigure class=\"docs-code phn-code-surface docs-code-diag\">\u003Cfigcaption class=\"docs-code-head\">\u003Cspan class=\"docs-code-file\">$ phn check\u003C\u002Fspan>\u003Cspan class=\"docs-code-label\">exit 1\u003C\u002Fspan>\u003C\u002Ffigcaption>\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"phn-diag\">\u003Ccode>\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:5:12\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P2516\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">property App\\Counter::$count has no type\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    5 |\u003C\u002Fspan>     public $count = 0;\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>            \u003Cspan class=\"diag-caret\">^^^^^^^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:7:5\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P2516\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">add() has no return type\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    7 |\u003C\u002Fspan>     add($step) {\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>     \u003Cspan class=\"diag-caret\">^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:7:9\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P2516\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">parameter $step of add() has no type\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    7 |\u003C\u002Fspan>     add($step) {\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>         \u003Cspan class=\"diag-caret\">^^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-summary\">1 files checked: 3 errors, 0 warnings\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003C\u002Fdiv>\n\u003Cp>A closure&#39;s parameters may stay untyped where the call gives them a type, as in\n\u003Ccode>array_map(fn ($u) =&gt; $u-&gt;email, $users)\u003C\u002Fcode>. A method that overrides one from PHP code may keep a\nbare \u003Ccode>array\u003C\u002Fcode> when its parent&#39;s docblock says what the array holds.\u003C\u002Fp>\n\u003Ch2 id=\"phaenons-own-words\">Phaenon&#39;s own words\u003Ca class=\"docs-anchor\" href=\"#phaenons-own-words\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The words Phaenon adds to PHP are written in lower case: \u003Ccode>throws\u003C\u002Fcode>, \u003Ccode>nothrow\u003C\u002Fcode>, \u003Ccode>type\u003C\u002Fcode>, \u003Ccode>of\u003C\u002Fcode>,\n\u003Ccode>in\u003C\u002Fcode>, \u003Ccode>out\u003C\u002Fcode>, \u003Ccode>class&lt;T&gt;\u003C\u002Fcode>, \u003Ccode>list&lt;T&gt;\u003C\u002Fcode>, \u003Ccode>map&lt;K, V&gt;\u003C\u002Fcode>, \u003Ccode>bytes\u003C\u002Fcode> and the cast \u003Ccode>(bytes)\u003C\u002Fcode>. Where only the\nword can stand, another case is read as the word and reported, \u003Ccode>P1006\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cdiv class=\"docs-example\">\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cfigcaption class=\"docs-code-head\">\u003Cspan class=\"docs-code-label\">you write\u003C\u002Fspan>\u003C\u002Ffigcaption>\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:#8F5E00;--phn-dark:#F2B43F\">namespace\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> App\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\">TYPE\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> Ids\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\"> =\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> List\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">int\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">>;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">function\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\"> first\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">Ids\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $ids\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">):\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> int\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> THROWS\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> \\\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">OutOfRangeException\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> =>\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $ids\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">[\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\">0\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:#8F5E00;--phn-dark:#F2B43F\"> throw\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> new\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> \\\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">OutOfRangeException\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\">'empty'\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">);\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface docs-code-diag\">\u003Cfigcaption class=\"docs-code-head\">\u003Cspan class=\"docs-code-file\">$ phn check\u003C\u002Fspan>\u003Cspan class=\"docs-code-label\">exit 1\u003C\u002Fspan>\u003C\u002Ffigcaption>\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"phn-diag\">\u003Ccode>\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:3:1\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P1006\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">`TYPE` is Phaenon's `type`, written in lower case; phn fmt rewrites it\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    3 |\u003C\u002Fspan> TYPE Ids = List&lt;int&gt;;\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan> \u003Cspan class=\"diag-caret\">^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:3:12\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P1006\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">`List` is Phaenon's `list`, written in lower case; phn fmt rewrites it\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    3 |\u003C\u002Fspan> TYPE Ids = List&lt;int&gt;;\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>            \u003Cspan class=\"diag-caret\">^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line head\">\u003Cspan class=\"diag-where\">src\u002FExample.phn:5:31\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P1006\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">`THROWS` is Phaenon's `throws`, written in lower case; phn fmt rewrites it\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    5 |\u003C\u002Fspan> function first(Ids $ids): int THROWS \\OutOfRangeException =&gt; $ids[0] ?? throw new \\OutOfRangeException('empty');\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">      |\u003C\u002Fspan>                               \u003Cspan class=\"diag-caret\">^^^^^^\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-summary\">1 files checked: 3 errors, 0 warnings\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003C\u002Fdiv>\n\u003Cp>Where the same spelling can be a name, it is the name: a method \u003Ccode>type()\u003C\u002Fcode>, a class \u003Ccode>Throws\u003C\u002Fcode>, a\nconstant \u003Ccode>NOTHROW\u003C\u002Fcode>. \u003Ccode>Map\u003C\u002Fcode> and \u003Ccode>Bytes\u003C\u002Fcode> are class names like any other, so a project can have a\nclass \u003Ccode>Map\u003C\u002Fcode>: \u003Ccode>Map&lt;string, int&gt;\u003C\u002Fcode> is that class, and where no class of that name exists it is\n\u003Ccode>P2001\u003C\u002Fcode>, with a message that says Phaenon&#39;s type is written \u003Ccode>map\u003C\u002Fcode>. PHP&#39;s own words keep PHP&#39;s\nrules, so \u003Ccode>INT\u003C\u002Fcode> and \u003Ccode>FUNCTION\u003C\u002Fcode> still compile.\u003C\u002Fp>\n\u003Cp>The words of earlier releases are gone: \u003Ccode>fun\u003C\u002Fcode> before a method (0.4.0 removed it; a method needs\nno keyword), and the operators \u003Ccode>is\u003C\u002Fcode>, \u003Ccode>as\u003C\u002Fcode> and \u003Ccode>as?\u003C\u002Fcode> (PHP&#39;s tests instead, see \u003Ca href=\"\u002Fdocs\u002Flanguage\u002Fnarrowing#no-is-or-as\">type tests and\nnarrowing\u003C\u002Fa>).\u003C\u002Fp>\n\u003Ch2 id=\"what-stays-php\">What stays PHP\u003Ca class=\"docs-anchor\" href=\"#what-stays-php\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Everything not listed here is PHP and compiles as PHP: references, \u003Ccode>include\u003C\u002Fcode> and \u003Ccode>require\u003C\u002Fcode>,\n\u003Ccode>static\u003C\u002Fcode> variables, \u003Ccode>@\u003C\u002Fcode>, \u003Ccode>$GLOBALS\u003C\u002Fcode>, \u003Ccode>__halt_compiler()\u003C\u002Fcode>, every class, enum, attribute and\nproperty-hook feature of PHP 8.5.\u003C\u002Fp>\n\u003Ch2 id=\"what-the-tools-rewrite\">What the tools rewrite\u003Ca class=\"docs-anchor\" href=\"#what-the-tools-rewrite\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>phn fmt\u003C\u002Fcode> and \u003Ccode>phn migrate\u003C\u002Fcode> fix part of the list mechanically:\u003C\u002Fp>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Rewritten by\u003C\u002Fth>\u003Cth>What\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>phn migrate\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>removes \u003Ccode>&lt;?php\u003C\u002Fcode>, a trailing \u003Ccode>?&gt;\u003C\u002Fcode> and \u003Ccode>declare(strict_types=1)\u003C\u002Fcode>; replaces tabs with spaces; lifts \u003Ccode>function\u003C\u002Fcode> off methods; lifts docblock types into the signature, and types a bare \u003Ccode>array\u003C\u002Fcode> as \u003Ccode>array&lt;mixed&gt;\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>phn fmt\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>replaces tabs with spaces; lifts \u003Ccode>function\u003C\u002Fcode> off methods; rewrites \u003Ccode>fun\u003C\u002Fcode>, \u003Ccode>is\u003C\u002Fcode>, \u003Ccode>as\u003C\u002Fcode> and \u003Ccode>as?\u003C\u002Fcode>; writes Phaenon&#39;s words in lower case\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>The rest is yours to change: \u003Ccode>global\u003C\u002Fcode>, \u003Ccode>goto\u003C\u002Fcode>, \u003Ccode>eval()\u003C\u002Fcode>, \u003Ccode>extract()\u003C\u002Fcode> and \u003Ccode>compact()\u003C\u002Fcode>, variable\nvariables, the alternative syntax, \u003Ccode>var\u003C\u002Fcode>, \u003Ccode>list()\u003C\u002Fcode>, and the types the checker asks for. \u003Ccode>phn check\u003C\u002Fcode> lists each place. See \u003Ca href=\"\u002Fdocs\u002Fgetting-started\u002Fmigrate\">migrate a PHP project\u003C\u002Fa> and\n\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fformatting\">formatting and fixers\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"see-also\">See also\u003Ca class=\"docs-anchor\" href=\"#see-also\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Flanguage\u002Foverview\">Phaenon for PHP developers\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fchecker\">The type checker\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n",1794925619547]