';
//The json test
$b4_j = microtime(1);
for ($i=0;$i<10000;$i++) {
$serial = md5(json_encode($array));
}
echo 'json_encode() w/ md5() took: '.($jTime = microtime(1)-$b4_j).' sec
';
echo '
json_encode is '.( round($sTime/$jTime,3) ).'x faster with a difference of '.($sTime-$jTime).' seconds';
echo '
Note anything less than 1x technically means JSON was slower.';