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 *c _{n,m}* in one matrix is added with the corresponding

*c*cell in the other.

_{n,m}And here’s the PHP solution, again with unit tests first.