Php55fix

Fixes compatibility with PHP 5.5.
- preg_replace --> preg_replace_callback (reason: deprecated)
- pattern modifiers /e in preg_replace_callback --> anon function