???????y????
<?php
$before = microtime(true);
$list= array(
"keya" => "the value a"
??"keyb" => "the value b"
??"keyc" => "the value c"
??"keyd" => "the value c"
??"keye" => "the value c"
);
for ($i=0 ; $i<100000 ; $i++) {
serialize($list);
}
$after = microtime(true);
echo ($after-$before)/$i . " sec/serialize ";
????1?? ???? desktop01
????OS ????: Microsoft Windows 7 ????
????OS ?汾: 6.1.7601 Service Pack 1 Build 7601
????Intel Core I3 4160@3.60GHz
????[01]: Intel64 Family 6 Model 60 Stepping 3 GenuineIntel ~3600
????PHP 5.3.10 (cli) (built: Feb  2 2012 20:27:51)
????D:projperf_test_php>php . est.php
????1.7948508262634E-6 sec/serialize
????D:projperf_test_php>php . est.php
????2.0318198204041E-6 sec/serialize
????D:projperf_test_php>php . est.php
????2.0627999305725E-6 sec/serialize
????2????????? H1 (???????????????????
????Processor : ARMv7 Processor rev 1 (v7l)
????processor : 0
????BogoMIPS : 1196.03
????Features : swp half thumb fastmult vfp edsp thumbee vfpv3 vfpv3d16
????CPU implementer : 0x41
????CPU architecture: 7
????CPU variant : 0x1
????CPU part : 0xc09
????CPU revision : 1
????Hardware : NXP BL-STB platform
????root@routon-h1:/mnt/usb/perf_test_php# ./test.php
????3.1562120914459E-5 sec/serialize
????root@routon-h1:/mnt/usb/perf_test_php# ./test.php
????3.129940032959E-5 sec/serialize
????root@routon-h1:/mnt/usb/perf_test_php# ./test.php
????3.1241970062256E-5 sec/serialize
????3??????G560 ?????????У?CPU???????????
????[01]: Intel64 Family 6 Model 37 Stepping 2 GenuineIntel ~2266 Mhz
????Intel Core i3 CPU M350@2.2Hz
????PHP 5.3.10 (cli) (built: Feb 2 2012 20:27:51)
????Win7:
????C:workperf_test_php>php . est.php
????3.260669708252E-6 sec/serialize
????C:workperf_test_php>php . est.php
????3.2750701904297E-6 sec/serialize
????C:workperf_test_php>php . est.php
????3.3444595336914E-6 sec/serialize
????????????????Kali Linux 1.0a ?? php 5.4 ???????£? ????linux??????ú??php5.4 ??й??????
????root@localhost:/media/h3usb/perf_test_php# php ./test.php
????1.9158411026001E-6 sec/serialize
????root@localhost:/media/h3usb/perf_test_php# php ./test.php
????1.947169303894E-6 sec/serialize
????root@localhost:/media/h3usb/perf_test_php# php ./test.php
????1.9439005851746E-6 sec/serialize
????4???????????? S12?? ????????H1 ???????????
????Intel Atom N270 @1.6 GHz
????[01]: x86 Family 6 Model 28 Stepping 2 GenuineIntel ~1600 Mhz
????D:perf_test_php>php test.php
????1.8191859722137E-5 sec/serialize
????D:perf_test_php>php test.php
????1.8366029262543E-5 sec/serialize
????D:perf_test_php>php test.php
????1.8153069019318E-5 sec/serialize
????5??Think Pad T43 ??????????? Interl Pentium 1.7Ghz
Windows XP?? php 5.3 :
C:work>php perf_test.php
6.4734196662903E-6 sec/serialize
C:work>php perf_test.php
6.4791107177734E-6 sec/serialize
C:work>php perf_test.php
6.4785194396973E-6 sec/serialize
Linux ???????? Linux kali-t43 3.18.0-kali3-686-pae
root@kali-t43:~# php ./perf-test.php
6.5963220596313E-6 sec/serialize
root@kali-t43:~# php ./perf-test.php
6.4203810691833E-6 sec/serialize
root@kali-t43:~# php ./perf-test.php
6.4209914207458E-6 sec/serialize