Here’s a second code puzzle from Ali’s challenges last Wednesday.

This one is also from CodeWars.

Given two n by n matrices, write a function that adds them, such that each cell cn,m in one matrix is added with the corresponding cn,m cell in the other.

And here’s the PHP solution, again with unit tests first.