I have such a management structure:
switch ($var) {
case TRUE:
break;
case FALSE:
break;
case NULL:
break;
}
And my case is NULLnever called because, as I found in the php manual:
Note that switch / case makes a free comparison .
I know what I can use IFinstead SWITCH, but I would not want to, I already have IF'sin each CASEmine SWITCH.
Is there any way to rewrite SWITCHor use some tricks to compare it with strings?
Green source
share