PHP Classes
elePHPant
Icontem

File: Performance-own.php

Recommend this page to a friend!
  Classes of Max Base  >  JPOPHP PHP JSON Parser Class  >  Performance-own.php  >  Download  
File: Performance-own.php
Role: Example script
Content type: text/plain
Description: Example script
Class: JPOPHP PHP JSON Parser Class
Encode and decode data in JSON format
Author: By
Last change:
Date: 6 months ago
Size: 413 bytes
 

 

Contents

Class file image Download
<?php
include "JPOPHP.php";
$data='{"name":"Max","family":"Base"}';
$time = microtime(true);
for(
$i=1;$i<=10000;$i++)
{
   
$json->decode($data);
}
echo (
microtime(true) - $time) . " elapsed\n";
/*
1th Time : 0.44240999221802 elapsed
2th Time : 0.43391299247742 elapsed
3th Time : 0.44072198867798 elapsed
4th Time : 0.43309497833252 elapsed
Sigma Time : 1.750139952
Average Time : 1.750139952 4 = 0.437534988
*/