Could someone suggest the best way to have the following switch statement? I don\'t know that it\'s possible to compare two values at once, but this would be ideal:
Using the new array syntax, this looks almost like what you want:
switch ([$color, $size]) { case ['blue', 'small']: echo 'blue and small'; break; case ['red', 'large']; echo 'red and large'; break; }