hhvm: Detect json-c parser
authorBryan Davis <bd808@wikimedia.org>
Sat, 8 Nov 2014 22:33:57 +0000 (15:33 -0700)
committerBryan Davis <bd808@wikimedia.org>
Sat, 8 Nov 2014 22:45:46 +0000 (15:45 -0700)
commit15018c24472d58e8ec858f2b2849726de52abb91
tree16824bea2d5b84a8bdcac0c1179d275f31c47860
parent05598771c1c977a802365e255351f702865657ae
hhvm: Detect json-c parser

Add detection for a json-c powered json_decode() implementation. Default
loose parsing behavior was previously attributed to HHVM, but additional
investigation has found that this is actually a "feature" of json-c.
HHVM optionally links with json-c for distributions that wish to avoid
being encumbered by the "shall be used for Good, not Evil" clause of the
JSON.org parser's license. The test case implementation stays the same,
but a feature flag style check is added to determine if the parser being
used is lenient or not.

Bug: 72778
Change-Id: Ieb8dddd2e324c90f45f2fc27ac13ab5fff733302
tests/phpunit/includes/json/FormatJsonTest.php