zendframework/zf2 — pull request #1803 by marc-mabe (2012-07-08 15:43:03+00:00)
Title: Zend\Escaper (micro) optimisations 

- make htmlNamedEntityMap static to not allocate memory each time instantiating an escaper
- Hex escape sequences are case-insensitive: no need to upper case
- use strpad instead of string concatenation + substr
- stren($str) == 0 is the same as $str === ''
- Use the *Matcher properties as callback definitions instead of create an array-callback each time calling escape
- array_key_exists -> isset