You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as a workaround: if you use match (gettype($defaultValue)) it works like you expect it.
we currently don't get the right type in this case, when there is a variable involved
This could be done. Analysing $type = gettype($defaultValue); could create ConditionalExpressionHolder in the sense: "if $type is 'string' then $defaultValue is string.
Activity
staabm commentedon Jan 21, 2026
as a workaround: if you use
match (gettype($defaultValue))it works like you expect it.we currently don't get the right type in this case, when there is a variable involved
https://phpstan.org/r/650d4f21-1e56-4993-bb01-1ef83f3db410
ondrejmirtes commentedon Feb 10, 2026
This could be done. Analysing
$type = gettype($defaultValue);could create ConditionalExpressionHolder in the sense: "if $type is'string'then$defaultValueisstring.