[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"docs:\u002Fdocs\u002Flanguage\u002Fexceptions":3},"\u003Cp>\u003Ccode>throws A|B\u003C\u002Fcode> after a signature names the exceptions a function or method lets escape, and\n\u003Ccode>nothrow\u003C\u002Fcode> says that it lets none escape. They are what a \u003Ccode>@throws\u003C\u002Fcode> tag says in a PHPStan\ndocblock, written in the signature: the checker verifies them against the body, and the compiled\nPHP carries them as \u003Ccode>@throws\u003C\u002Fcode> tags. They are not Java&#39;s checked exceptions: a caller does not\nhave to catch or redeclare anything.\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\"> InsufficientFunds\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> extends\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> \\\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">DomainException\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\"> Account\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\">    private\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> int\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $balance \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\">    balance\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:#8F5E00;--phn-dark:#F2B43F\"> nothrow\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> =>\u003C\u002Fspan>\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\">balance\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:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">    \u002F** Takes money out, never below zero. *\u002F\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">    withdraw\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:#1F2127;--phn-dark:#E2E3E7\"> $amount\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">):\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> void\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> throws\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> InsufficientFunds\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\">        if\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> (\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">$amount \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\">>\u003C\u002Fspan>\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\">balance\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\">            throw\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> new\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> InsufficientFunds\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\">\"cannot withdraw \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">$amount\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\">\"\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:#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\">balance \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\">-=\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $amount\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\">\u003Cfigcaption class=\"docs-code-head\">\u003Cspan class=\"docs-code-label\">phn build writes\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:#474C5A;--phn-dark:#B1B6C4\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">?\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\">php\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">\u002F* @generated by phaenon from Example.phn *\u002F\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">declare\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\">strict_types\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\">=\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\">1\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\">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\"> InsufficientFunds\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> extends\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> \\\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">DomainException\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\"> Account\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\">    private\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> int\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $balance \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:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">    \u002F**\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">     * \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#5C6170;--phn-light-font-style:italic;--phn-dark:#8A90A0;--phn-dark-font-style:italic\">@throws\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> void\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">     *\u002F\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">    public\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> function\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\"> balance\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">():\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> int\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\">        return\u003C\u002Fspan>\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\">balance\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\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">    \u002F**\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">     * Takes money out, never below zero.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">     * \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#5C6170;--phn-light-font-style:italic;--phn-dark:#8A90A0;--phn-dark-font-style:italic\">@throws\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-light-font-style:italic;--phn-dark:#6FC3DF;--phn-dark-font-style:italic\"> InsufficientFunds\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">     *\u002F\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">    public\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> function\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\"> withdraw\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:#1F2127;--phn-dark:#E2E3E7\"> $amount\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">):\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> void\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\">        if\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> (\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">$amount \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\">>\u003C\u002Fspan>\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\">balance\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\">            throw\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> new\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> InsufficientFunds\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\">\"cannot withdraw \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">$amount\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\">\"\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:#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\">balance \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\">-=\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $amount\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\u003C\u002Fdiv>\n\u003Ch2 id=\"throws\">\u003Ccode>throws\u003C\u002Fcode>\u003Ca class=\"docs-anchor\" href=\"#throws\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The clause follows the return type, or the parameter list when there is no return type, and\ncomes before the body, the arrow or the \u003Ccode>;\u003C\u002Fcode>. It names a class or a union written as in a\n\u003Ccode>catch\u003C\u002Fcode>, \u003Ccode>throws NotFound|Conflict\u003C\u002Fcode>. Each member must be a \u003Ccode>Throwable\u003C\u002Fcode>, or a type parameter\nbounded by one (\u003Ccode>P2319\u003C\u002Fcode>).\u003C\u002Fp>\n\u003Cp>It means what the \u003Ccode>@throws\u003C\u002Fcode> tag means: documentation that the checker reads and holds to the\nbody.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>A member the body never throws\u003C\u002Fstrong> is a warning, \u003Ccode>P2404\u003C\u002Fcode>, on a function and on a method nobody\ncan override (private, final, or in a final class). An overridable method keeps the member\nwithout a finding, because its clause is the contract its overrides may use.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>An exception the body throws but does not declare\u003C\u002Fstrong> is not reported. The clause is not a\ncomplete list, and no exception class is treated as &quot;checked&quot;.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A \u003Ccode>catch\u003C\u002Fcode> that nothing in its \u003Ccode>try\u003C\u002Fcode> block can throw\u003C\u002Fstrong> is a warning, \u003Ccode>P2403\u003C\u002Fcode>: the checker\nknows what each call declares.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The clause is for named functions and methods. A closure keeps a \u003Ccode>@throws\u003C\u002Fcode> docblock tag.\u003C\u002Fp>\n\u003Ch2 id=\"nothrow\">\u003Ccode>nothrow\u003C\u002Fcode>\u003Ca class=\"docs-anchor\" href=\"#nothrow\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>nothrow\u003C\u002Fcode> stands where \u003Ccode>throws\u003C\u002Fcode> would, and says that nothing escapes. It is the clause spelling\nof PHPStan&#39;s \u003Ccode>@throws void\u003C\u002Fcode>, and compiles to that tag.\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\"> ratio\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:#1F2127;--phn-dark:#E2E3E7\"> $part\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:#1F2127;--phn-dark:#E2E3E7\"> $whole\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:#8F5E00;--phn-dark:#F2B43F\"> nothrow\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> =>\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\"> intdiv\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">$part \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">*\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> 100\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">,\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $whole\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:#1F2127;--phn-dark:#E2E3E7\"> $part \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">%\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $whole\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:85\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P2405\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">function App\\ratio() declares nothrow but throws DivisionByZeroError here\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    3 |\u003C\u002Fspan> function ratio(int $part, int $whole): int nothrow =&gt; intdiv($part * 100, $whole) + $part % $whole;\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\u003Cp>What it promises is checked against the throw points the checker can name:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>a \u003Ccode>throw\u003C\u002Fcode>, a call to a function that declares what it throws, a \u003Ccode>\u002F\u003C\u002Fcode> or \u003Ccode>%\u003C\u002Fcode> whose divisor may\nbe zero, and a \u003Ccode>match\u003C\u002Fcode> without \u003Ccode>default\u003C\u002Fcode> that is not exhaustive are each \u003Ccode>P2405\u003C\u002Fcode> inside a\n\u003Ccode>nothrow\u003C\u002Fcode> body;\u003C\u002Fli>\n\u003Cli>a call to a function that declares nothing does not break it: such a function may throw\nanything, and no finding is built on that;\u003C\u002Fli>\n\u003Cli>a call to a \u003Ccode>nothrow\u003C\u002Fcode> function is not a throw point, so a \u003Ccode>catch\u003C\u002Fcode> around such calls alone is\ndead (\u003Ccode>P2403\u003C\u002Fcode>).\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Ccode>nothrow\u003C\u002Fcode> is not a guarantee at run time. A \u003Ccode>TypeError\u003C\u002Fcode> from a callee that declares nothing, or\nan \u003Ccode>Error\u003C\u002Fcode> PHP raises on its own, can still escape.\u003C\u002Fp>\n\u003Cp>\u003Ccode>nothrow\u003C\u002Fcode> and \u003Ccode>throws\u003C\u002Fcode> together are a syntax error. \u003Ccode>nothrow\u003C\u002Fcode> beside a docblock \u003Ccode>@throws\u003C\u002Fcode> tag\nthat names an exception, or a \u003Ccode>throws\u003C\u002Fcode> clause beside a \u003Ccode>@throws void\u003C\u002Fcode> tag, is \u003Ccode>P2320\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"inheritance\">Inheritance\u003Ca class=\"docs-anchor\" href=\"#inheritance\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>A method that declares nothing takes the declaration of the method it overrides or implements:\nits \u003Ccode>throws\u003C\u002Fcode> clause, its \u003Ccode>@throws\u003C\u002Fcode> tags or its \u003Ccode>nothrow\u003C\u002Fcode>. So an implementation of a \u003Ccode>nothrow\u003C\u002Fcode>\ninterface method is held to it:\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\">interface\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> Repository\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:#7A3D99;--phn-dark:#C9A0F0\">    find\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:#1F2127;--phn-dark:#E2E3E7\"> $id\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">):\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\"> ?\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">object\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> nothrow\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\">\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\"> SqlRepository\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> implements\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> Repository\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:#7A3D99;--phn-dark:#C9A0F0\">    find\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:#1F2127;--phn-dark:#E2E3E7\"> $id\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">):\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\"> ?\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">object\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\">        if\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> (\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\">$id \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\">&#x3C;\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>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\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\">InvalidArgumentException\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\">'negative id'\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\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">        return\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> null\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:12:13\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P2405\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">App\\SqlRepository::find() inherits nothrow from App\\Repository::find() but throws InvalidArgumentException here\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">   12 |\u003C\u002Fspan>             throw new \\InvalidArgumentException('negative id');\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\u003Cp>An override that writes its own clause is held to that clause only, not to the parent&#39;s: the\n0.7.2 checker, like PHPStan, does not compare an override&#39;s \u003Ccode>throws\u003C\u002Fcode> with its parent&#39;s.\u003C\u002Fp>\n\u003Ch2 id=\"what-the-checker-reports\">What the checker reports\u003Ca class=\"docs-anchor\" href=\"#what-the-checker-reports\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"docs-table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Code\u003C\u002Fth>\u003Cth>Severity\u003C\u002Fth>\u003Cth>When\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>P2319\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>error\u003C\u002Ftd>\u003Ctd>\u003Ccode>throws\u003C\u002Fcode> names a class that is not a \u003Ccode>Throwable\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>P2320\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>error\u003C\u002Ftd>\u003Ctd>\u003Ccode>nothrow\u003C\u002Fcode> or \u003Ccode>@throws void\u003C\u002Fcode> beside a thrown type\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>P2403\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>warning\u003C\u002Ftd>\u003Ctd>A \u003Ccode>catch\u003C\u002Fcode> that nothing in its \u003Ccode>try\u003C\u002Fcode> block can reach\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>P2404\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>warning\u003C\u002Ftd>\u003Ctd>A \u003Ccode>throws\u003C\u002Fcode> member the body never throws\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>P2405\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>error\u003C\u002Ftd>\u003Ctd>A \u003Ccode>nothrow\u003C\u002Fcode> (or \u003Ccode>@throws void\u003C\u002Fcode>) body that throws, inherited or written\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\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\"> Money\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\"> Cache\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\">    private\u003C\u002Fspan>\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\"> int\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> throws\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> \\\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">RuntimeException\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> =>\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> 1\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\">    get\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\">        try\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:#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:#7A3D99;--phn-dark:#C9A0F0\">load\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:#8F5E00;--phn-dark:#F2B43F\"> catch\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> (\\\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">LogicException\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $e\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\">            return\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\">\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\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">    total\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:#8F5E00;--phn-dark:#F2B43F\"> throws\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> Money\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> =>\u003C\u002Fspan>\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:#7A3D99;--phn-dark:#C9A0F0\">get\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:7:13\u003C\u002Fspan>: \u003Cspan class=\"diag-warning\">warning\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P2404\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">App\\Cache::load() declares it throws RuntimeException, which its body never throws\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">    7 |\u003C\u002Fspan>     private load(): int throws \\RuntimeException =&gt; 1;\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:12:18\u003C\u002Fspan>: \u003Cspan class=\"diag-warning\">warning\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P2403\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">LogicException is never thrown in the try block\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">   12 |\u003C\u002Fspan>         } catch (\\LogicException $e) {\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:17:25\u003C\u002Fspan>: \u003Cspan class=\"diag-error\">error\u003C\u002Fspan> \u003Cspan class=\"diag-code\">P2319\u003C\u002Fspan>: \u003Cspan class=\"diag-message\">App\\Money is not a Throwable, so throws cannot name it\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"diag-gutter\">   17 |\u003C\u002Fspan>     total(): int throws Money =&gt; $this-&gt;get();\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, 2 warnings\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003C\u002Fdiv>\n\u003Ch2 id=\"in-the-compiled-php\">In the compiled PHP\u003Ca class=\"docs-anchor\" href=\"#in-the-compiled-php\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>throws A|B\u003C\u002Fcode> becomes a \u003Ccode>@throws A|B\u003C\u002Fcode> line in the declaration&#39;s docblock, and \u003Ccode>nothrow\u003C\u002Fcode> becomes\n\u003Ccode>@throws void\u003C\u002Fcode>. The compiler adds the docblock when there is none, and adds the line to one that\nexists. Nothing else changes: PHP does not read the tag, and PHPStan, PhpStorm and the checker\ndo.\u003C\u002Fp>\n\u003Ch2 id=\"migrating\">Migrating\u003Ca class=\"docs-anchor\" href=\"#migrating\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>phn migrate\u003C\u002Fcode> lifts the \u003Ccode>@throws\u003C\u002Fcode> tags that have no description into a \u003Ccode>throws\u003C\u002Fcode> clause, several\ntags into one union, and a \u003Ccode>@throws void\u003C\u002Fcode> that is the only \u003Ccode>@throws\u003C\u002Fcode> tag into \u003Ccode>nothrow\u003C\u002Fcode>. A tag\nwith a description stays in the docblock. This PHP:\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:#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\"> Account\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\">    private\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> int\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $balance \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:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">    \u002F**\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">     * \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#5C6170;--phn-light-font-style:italic;--phn-dark:#8A90A0;--phn-dark-font-style:italic\">@throws\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> void\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">     *\u002F\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">    public\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> function\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\"> balance\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">():\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> int\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\">        return\u003C\u002Fspan>\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\">balance\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\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">    \u002F**\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">     * \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#5C6170;--phn-light-font-style:italic;--phn-dark:#8A90A0;--phn-dark-font-style:italic\">@throws\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> \\\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-light-font-style:italic;--phn-dark:#6FC3DF;--phn-dark-font-style:italic\">DomainException\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">     * \u003C\u002Fspan>\u003Cspan style=\"--phn-light:#5C6170;--phn-light-font-style:italic;--phn-dark:#8A90A0;--phn-dark-font-style:italic\">@throws\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> \\\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-light-font-style:italic;--phn-dark:#6FC3DF;--phn-dark-font-style:italic\">OverflowException\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7C;--phn-light-font-style:italic;--phn-dark:#7D8393;--phn-dark-font-style:italic\">     *\u002F\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\">    public\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> function\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\"> close\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">():\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> void\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:#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:#7A3D99;--phn-dark:#C9A0F0\">withdraw\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\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\">balance\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\u003Cp>becomes:\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:#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\"> Account\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\">    private\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> int\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#1F2127;--phn-dark:#E2E3E7\"> $balance \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\">    balance\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:#8F5E00;--phn-dark:#F2B43F\"> nothrow\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> =>\u003C\u002Fspan>\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\">balance\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\">    close\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">():\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\"> void\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#8F5E00;--phn-dark:#F2B43F\"> throws\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> \\\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">DomainException\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">|\\\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">OverflowException\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> =>\u003C\u002Fspan>\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:#7A3D99;--phn-dark:#C9A0F0\">withdraw\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">(\u003C\u002Fspan>\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\">balance\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\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\u002Ffunctions\">Methods, functions and closures\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fchecker\">The type checker\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n",1794925619457]