PHP SPL Iterator examples to solve real world problems