added support for unescaped backslashes and pretty print for PHP < 5.4