Many companies still use the FizzBuzz coding challenge as a simple way to filter out candidates. My current company used a variation of FizzBuzz for my interview.
I was thinking about that challenge recently and working on converting an if/else
statement to a match
expression in PHP when I thought of a neat way to solve
the FizzBuzz problem using the new match
expression in PHP 8.0.
Obviously you’d need to loop through the results, but it’s a nice compact way of solving the problem.