Skip to content

UnreachableCode

Code appears after an unconditional return, throw, or exit.

<?php
function early(): int {
return 1;
$x = 2; // never executed
}

Remove the unreachable statements or restructure the control flow.