3
3
################################################################################
4
4
# PHP Benchmark Performance Script #
5
5
# 2010 Code24 BV #
6
- # 2015-2019 Rusoft #
6
+ # 2015-2020 Rusoft #
7
7
# #
8
8
# Author : Alessandro Torrisi #
9
9
# Company : Code24 BV, The Netherlands #
10
10
# Author : Sergey Dryabzhinsky #
11
11
# Company : Rusoft Ltd, Russia #
12
- # Date : Feb 22 , 2020 #
13
- # Version : 1.0.36 #
12
+ # Date : Nov 26 , 2020 #
13
+ # Version : 1.0.37 #
14
14
# License : Creative Commons CC-BY license #
15
15
# Website : https://github.com/rusoft/php-simple-benchmark-script #
16
16
# Website : https://git.rusoft.ru/open-source/php-simple-benchmark-script #
17
17
# #
18
18
################################################################################
19
19
*/
20
20
21
- $ scriptVersion = '1.0.36 ' ;
21
+ $ scriptVersion = '1.0.37 ' ;
22
22
23
23
ini_set ('display_errors ' , 0 );
24
24
ini_set ('error_log ' , null );
315
315
'7.2 ' => 105 ,
316
316
'7.3 ' => 92 ,
317
317
'7.4 ' => 86 ,
318
+ '8.0 ' => 86 ,
318
319
);
319
320
$ dumbTestMaxPhpTimes = array (
320
321
'4.4 ' => 2.13 ,
328
329
'7.2 ' => 1.18 ,
329
330
'7.3 ' => 1.05 ,
330
331
'7.4 ' => 1.02 ,
332
+ '8.0 ' => 1.02 ,
331
333
);
332
334
$ testsLoopLimits = array (
333
335
'01_math ' => 1000000 ,
358
360
'21_loop_except ' => 4000000 ,
359
361
'22_loop_nullop ' => 50000000 ,
360
362
'23_loop_spaceship ' => 50000000 ,
361
- '24_xmlrpc_encode ' => 200000 ,
362
- '25_xmlrpc_decode ' => 30000 ,
363
363
'26_1_public ' => 5000000 ,
364
364
'26_2_getset ' => 5000000 ,
365
365
'26_3_magic ' => 5000000 ,
@@ -657,7 +657,7 @@ function dumb_test_Functions()
657
657
658
658
$ count = 100000 ;
659
659
$ time_start = get_microtime ();
660
- $ stringFunctions = array ('strtoupper ' , 'strtolower ' , 'strlen ' , 'str_rot13 ' , 'ord ' , 'mb_strlen ' , 'trim ' , 'md5 ' , 'json_encode ' , ' xmlrpc_encode ' );
660
+ $ stringFunctions = array ('strtoupper ' , 'strtolower ' , 'strlen ' , 'str_rot13 ' , 'ord ' , 'mb_strlen ' , 'trim ' , 'md5 ' , 'json_encode ' );
661
661
foreach ($ stringFunctions as $ key => $ function ) {
662
662
if (!function_exists ($ function )) {
663
663
unset($ stringFunctions [$ key ]);
@@ -1421,85 +1421,6 @@ function test_20_Type_Conversion()
1421
1421
}
1422
1422
1423
1423
1424
- function test_24_XmlRpc_Encode ()
1425
- {
1426
- global $ stringTest , $ emptyResult , $ testsLoopLimits , $ totalOps ;
1427
-
1428
- if (!function_exists ('xmlrpc_encode ' )) {
1429
- return $ emptyResult ;
1430
- }
1431
-
1432
- $ data = array (
1433
- // XmlRpc don't like html tags (php-7.2 + libxmlrpc-epi)
1434
- base64_encode ($ stringTest ),
1435
- 123456 ,
1436
- 123.456 ,
1437
- array (123456 ),
1438
- null ,
1439
- false ,
1440
- );
1441
- $ obj = new stdClass ();
1442
- $ obj ->fieldStr = 'value ' ;
1443
- $ obj ->fieldInt = 123456 ;
1444
- $ obj ->fieldFloat = 123.456 ;
1445
- $ obj ->fieldArray = array (123456 );
1446
- $ obj ->fieldNull = null ;
1447
- $ obj ->fieldBool = false ;
1448
- $ data [] = $ obj ;
1449
-
1450
- $ count = $ testsLoopLimits ['24_xmlrpc_encode ' ];
1451
- $ time_start = get_microtime ();
1452
- for ($ i = 0 ; $ i < $ count ; $ i ++) {
1453
- foreach ($ data as $ value ) {
1454
- $ r = xmlrpc_encode ($ value );
1455
- }
1456
- }
1457
- $ totalOps += $ count ;
1458
- return format_result_test (get_microtime () - $ time_start , $ count , mymemory_usage ());
1459
- }
1460
-
1461
- function test_25_XmlRpc_Decode ()
1462
- {
1463
- global $ stringTest , $ emptyResult , $ testsLoopLimits , $ totalOps ;
1464
-
1465
- if (!function_exists ('xmlrpc_decode ' )) {
1466
- return $ emptyResult ;
1467
- }
1468
-
1469
- $ data = array (
1470
- // XmlRpc don't like html tags (php-7.2 + libxmlrpc-epi)
1471
- base64_encode ($ stringTest ),
1472
- 123456 ,
1473
- 123.456 ,
1474
- array (123456 ),
1475
- null ,
1476
- false ,
1477
- );
1478
- $ obj = new stdClass ();
1479
- $ obj ->fieldStr = 'value ' ;
1480
- $ obj ->fieldInt = 123456 ;
1481
- $ obj ->fieldFloat = 123.456 ;
1482
- $ obj ->fieldArray = array (123456 );
1483
- $ obj ->fieldNull = null ;
1484
- $ obj ->fieldBool = false ;
1485
- $ data [] = $ obj ;
1486
-
1487
- foreach ($ data as $ key => $ value ) {
1488
- $ data [$ key ] = xmlrpc_encode ($ value );
1489
- }
1490
-
1491
- $ count = $ testsLoopLimits ['25_xmlrpc_decode ' ];
1492
- $ time_start = get_microtime ();
1493
- for ($ i = 0 ; $ i < $ count ; $ i ++) {
1494
- foreach ($ data as $ value ) {
1495
- $ r = xmlrpc_decode ($ value );
1496
- }
1497
- }
1498
- $ totalOps += $ count ;
1499
- return format_result_test (get_microtime () - $ time_start , $ count , mymemory_usage ());
1500
- }
1501
-
1502
-
1503
1424
$ functions = get_defined_functions ();
1504
1425
sort ($ functions ['user ' ]);
1505
1426
@@ -1529,11 +1450,6 @@ function test_25_XmlRpc_Decode()
1529
1450
echo "<pre>Extenstion 'json' not loaded or not compiled! JSON tests will produce empty result!</pre> " ;
1530
1451
$ has_json = "no " ;
1531
1452
}
1532
- $ has_xmlrpc = "yes " ;
1533
- if (!function_exists ('xmlrpc_encode ' )) {
1534
- echo "<pre>Extenstion 'xmlrpc' not loaded or not compiled! XmlRpc tests will procude empty result!</pre> " ;
1535
- $ has_xmlrpc = "no " ;
1536
- }
1537
1453
$ has_pcre = "yes " ;
1538
1454
if (!function_exists ('preg_match ' )) {
1539
1455
echo "<pre>Extenstion 'pcre' not loaded or not compiled! Regex tests will procude empty result!</pre> " ;
@@ -1560,7 +1476,6 @@ function test_25_XmlRpc_Decode()
1560
1476
. str_pad ("available modules " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : \n"
1561
1477
. str_pad ("mbstring " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_mbstring \n"
1562
1478
. str_pad ("json " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_json \n"
1563
- . str_pad ("xmlrpc " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_xmlrpc \n"
1564
1479
. str_pad ("pcre " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_pcre \n"
1565
1480
. str_pad ("Max execution time " , $ padInfo ) . " : " . $ maxTime . " sec \n"
1566
1481
. str_pad ("Crypt hash algo " , $ padInfo ) . " : " . $ cryptAlgoName . "\n"
0 commit comments