Is it possible to use three parameters in switch-case, like this:
switch($var1, $var2, $var3){
case true, false, false:
echo \"Hello\";
b
This is the sort of thing that used to be handled by bitwise operators:
if (($var1 << 2) & ($var2 << 1) & $var3) == 4) ...
...back when 'true' was 1.
That being said, the above is concise, but it's pretty hard to read and maintain. Nevertheless, if you have a lot of similar statements, shifting/ANDing might be a way to go to get things under control:
switch (($var1 << 2) & ($var2 << 1) & $var3)) {
case 0: // false, false, false
...stuff...
case 1: // false, false, true
...different stuff...
// all 8 cases if you REALLY care
}