PHP with lexical scoping in Haskell