Functionnal programming in PHP