Skip to content

MIR0407

UnevaluatedCode

A switch/match arm can never be reached given the subject’s inferred type (e.g. case "int" for gettype(), which returns "integer").

<?php
switch (gettype($x)) { case 'int': break; } // never matches

Use the value the subject can actually take ('integer').