Kata #1 with PHP solution (recursive)