FormatJson: Skip whitespace cleanup when unnecessary
authorKevin Israel <pleasestand@live.com>
Mon, 14 Apr 2014 07:14:33 +0000 (03:14 -0400)
committerKevin Israel <pleasestand@live.com>
Fri, 25 Apr 2014 00:54:44 +0000 (20:54 -0400)
commitbec7e8287c690ef33ae2b0da084ae274bf192220
tree40007adb674f4fb9caefafc95e24d08103474998
parentfef5c1891a6d3164f78e9c68bd0908f92b3b5778
FormatJson: Skip whitespace cleanup when unnecessary

The patch[1] for PHP bug 66021[2], which removes the same undesirable
whitespace that WS_CLEANUP_REGEX does, has been merged into php-src.
Subsequent PHP versions having the patch shouldn't have to take the
10-20% performance hit from that workaround.

[1]: https://github.com/php/php-src/commit/82a4f1a1a287
[2]: https://bugs.php.net/bug.php?id=66021

Change-Id: I717a0e164952cc6ace104f13f6236e86c4ab8b58
includes/json/FormatJson.php