* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Parsica\Parsica\JSON\JSON as ParsicaJSON; use Json as BaseMaxJson; class JSONBench { private string $data; function __construct() { $this->data = <<data); } /** * @Revs(10) * @Iterations(10) */ public function bench_Parsica_JSON() { $result = ParsicaJSON::json()->tryString($this->data); } /** * @Revs(10) * @Iterations(10) */ public function bench_basemax_jpophp() { require_once(__DIR__.'/JPOPHP/JsonParser.php'); (new JPOPHP\Json())->decode($this->data); } }