I’m still inspired by Scala way of thinking. I wonder if some functional paradigms can be smuggled into PHP. My goal is to quickly code flexible string converter without using loops or if’s (ternary operators don’t count ;-) ). I’ll be using functions that take other functions as their arguments, which are known as higher order functions in Scala. Of course, in Scala you can force what kind of arguments function takes, and what it returns. In PHP you can use callable typehint and tedious reflection processing.
Enough talking, gimme some code!