- var_dump: documentation ( source)
- json_decode: documentation ( source)
- json_last_error: documentation ( source)
- microtime: documentation ( source)
- round: documentation ( source)
<?php
$string = '[]';
for ($i = 0; $i < 50000; $i++)
$string = '[' . $string . ']';
$s = microtime(true);
json_decode($string);
$s = microtime(true) - $s;
var_dump(json_last_error(), JSON_ERROR_DEPTH, round($s, 5));