Primitives for functional programming in PHP