10
10
# Author : Sergey Dryabzhinsky #
11
11
# Company : Rusoft Ltd, Russia #
12
12
# Date : Jun 4, 2025 #
13
- # Version : 1.0.62 #
13
+ # Version : 1.0.63-dev #
14
14
# License : Creative Commons CC-BY license #
15
15
# Website : https://github.com/rusoft/php-simple-benchmark-script #
16
16
# Website : https://gitea.rusoft.ru/open-source/php-simple-benchmark-script #
20
20
21
21
include_once ("php-options.php " );
22
22
23
- $ scriptVersion = '1.0.62 ' ;
23
+ $ scriptVersion = '1.0.63-dev ' ;
24
24
25
25
// Special string to flush buffers, nginx for example
26
26
$ flushStr = '<!-- ' .str_repeat (" " , 8192 ).' --> ' ;
138
138
if (extension_loaded ('gd ' )) {
139
139
@include_once ("php-gd-imagick-common.inc " );
140
140
@include_once ("php-gd.inc " );
141
+ @include_once ("mod-gd-empty-gif.inc " );
142
+ @include_once ("mod-gd-empty-png.inc " );
143
+ @include_once ("mod-gd-empty-jpg.inc " );
144
+ @include_once ("mod-gd-empty-webp.inc " );
145
+ @include_once ("mod-gd-empty-avif.inc " );
141
146
}
142
147
if (extension_loaded ('imagick ' )) {
143
148
@include_once ("php-gd-imagick-common.inc " );
@@ -815,6 +820,11 @@ function gethostname() {
815
820
'39_07_kvs_sqlite3_generic_file ' => 500000 ,
816
821
'39_08_kvs_sqlite3_devshm_file ' => 500000 ,
817
822
'39_09_kvs_sqlite3_memory_file ' => 500000 ,
823
+ '40_01_gd_save_fill_empty_gif ' => 10000 ,
824
+ '40_02_gd_save_fill_empty_png ' => 10000 ,
825
+ '40_03_gd_save_fill_empty_jpg ' => 10000 ,
826
+ '40_04_gd_save_fill_empty_webp ' => 10000 ,
827
+ '40_05_gd_save_fill_empty_avif ' => 10000 ,
818
828
);
819
829
// Should not be more than X Mb
820
830
// Different PHP could use different amount of memory
@@ -882,6 +892,11 @@ function gethostname() {
882
892
'39_07_kvs_sqlite3_generic_file ' => 4 ,
883
893
'39_08_kvs_sqlite3_devshm_file ' => 4 ,
884
894
'39_09_kvs_sqlite3_memory_file ' => 4 ,
895
+ '40_01_gd_save_fill_empty_gif ' => 4 ,
896
+ '40_02_gd_save_fill_empty_png ' => 4 ,
897
+ '40_03_gd_save_fill_empty_jpg ' => 4 ,
898
+ '40_04_gd_save_fill_empty_webp ' => 4 ,
899
+ '40_05_gd_save_fill_empty_avif ' => 4 ,
885
900
);
886
901
887
902
/** ---------------------------------- Common functions -------------------------------------------- */
@@ -1721,6 +1736,26 @@ function filter_out_name_by_pattern($key)
1721
1736
$ has_eacc = "{$ colorYellow }yes {$ colorReset }" ;
1722
1737
}
1723
1738
$ has_gd = "{$ colorYellow }no {$ colorReset }" ;
1739
+ $ has_gdgif = "{$ colorYellow }no {$ colorReset }" ;
1740
+ $ has_gdpng = "{$ colorYellow }no {$ colorReset }" ;
1741
+ $ has_gdjpg = "{$ colorYellow }no {$ colorReset }" ;
1742
+ $ has_gdwebp = "{$ colorYellow }no {$ colorReset }" ;
1743
+ $ has_gdavif = "{$ colorYellow }no {$ colorReset }" ;
1744
+ if (function_exists ('imagegif ' )) {
1745
+ $ has_gdgif = "{$ colorGreen }yes {$ colorReset }" ;
1746
+ }
1747
+ if (function_exists ('imagepng ' )) {
1748
+ $ has_gdpng = "{$ colorGreen }yes {$ colorReset }" ;
1749
+ }
1750
+ if (function_exists ('imagejpeg ' )) {
1751
+ $ has_gdjpg = "{$ colorGreen }yes {$ colorReset }" ;
1752
+ }
1753
+ if (function_exists ('imagewebp ' )) {
1754
+ $ has_gdwebp = "{$ colorGreen }yes {$ colorReset }" ;
1755
+ }
1756
+ if (function_exists ('imageavif ' )) {
1757
+ $ has_gdavif = "{$ colorGreen }yes {$ colorReset }" ;
1758
+ }
1724
1759
if (extension_loaded ('gd ' )) {
1725
1760
$ has_gd = "{$ colorGreen }yes {$ colorReset }" ;
1726
1761
$ info = gd_info ();
@@ -1808,6 +1843,7 @@ function filter_out_name_by_pattern($key)
1808
1843
if (!defined ('ZLIB_VERSION ' )) define ('ZLIB_VERSION ' , '-.-- ' );
1809
1844
if (!defined ('MEMCACHE_VERSION ' )) define ('MEMCACHE_VERSION ' , '-.-- ' );
1810
1845
if (!defined ('REDIS_VERSION ' )) define ('REDIS_VERSION ' , '-.-- ' );
1846
+ if (!defined ('SQLITE3_VERSION ' )) define ('SQLITE3_VERSION ' , '-.-- ' );
1811
1847
if (!defined ('LIBXML_DOTTED_VERSION ' )) define ('LIBXML_DOTTED_VERSION ' , '-.-.- ' );
1812
1848
if (!defined ('INTL_ICU_VERSION ' )) define ('INTL_ICU_VERSION ' , '-.- ' );
1813
1849
if (!defined ('LIBZSTD_VERSION_STRING ' )) define ('LIBZSTD_VERSION_STRING ' , '-.-.- ' );
@@ -1819,7 +1855,8 @@ function print_results_common()
1819
1855
global $ availableFunctions ;
1820
1856
global $ line , $ padHeader , $ cpuInfo , $ padInfo , $ scriptVersion , $ maxTime , $ originTimeLimit , $ originMemoryLimit , $ cryptAlgoName , $ memoryLimitMb ;
1821
1857
global $ flushStr , $ has_apc , $ has_pcre , $ has_intl , $ has_json , $ has_simplexml , $ has_dom , $ has_mbstring , $ has_opcache , $ has_xcache ;
1822
- global $ has_gd , $ has_imagick , $ has_igb , $ has_msg , $ has_jsond , $ has_jsond_as_json ;
1858
+ global $ has_gd , $ has_gdgif , $ has_gdpng , $ has_gdjpg , $ has_gdwebp , $ has_gdavif ;
1859
+ global $ has_imagick , $ has_igb , $ has_msg , $ has_jsond , $ has_jsond_as_json ;
1823
1860
global $ has_zlib , $ has_uuid , $ has_gzip , $ has_bz2 , $ has_lz4 , $ has_snappy , $ has_zstd , $ has_brotli ;
1824
1861
global $ has_apcu , $ has_shmop , $ has_memcache , $ has_redis , $ has_sqlite3 , $ opcache , $ has_eacc , $ has_xdebug , $ xcache , $ apcache , $ eaccel , $ xdebug , $ xdbg_mode , $ obd_set , $ mbover ;
1825
1862
global $ showOnlySystemInfo , $ padLabel , $ functions , $ runOnlySelectedTests , $ selectedTests , $ totalOps ;
@@ -1856,6 +1893,11 @@ function print_results_common()
1856
1893
. str_pad ("intl " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_intl " . ($ has_intl == "{$ colorGreen }yes {$ colorReset }" ? '; icu version: ' . INTL_ICU_VERSION : '' )."\n"
1857
1894
. str_pad ("-optional-> " , $ padInfo , ' ' , STR_PAD_LEFT ) . "\n"
1858
1895
. str_pad ("gd " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_gd: version: " . GD_VERSION ."\n"
1896
+ . str_pad ("\t- GIF " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_gdgif " ."\n"
1897
+ . str_pad ("\t- PNG " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_gdpng " ."\n"
1898
+ . str_pad ("\t- JPG " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_gdjpg " ."\n"
1899
+ . str_pad ("\t- WEBP " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_gdwebp " ."\n"
1900
+ . str_pad ("\t- AVIF " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_gdavif " ."\n"
1859
1901
. str_pad ("imagick " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_imagick: version: " .IMG_VERSION ."\n"
1860
1902
. str_pad ("apcu " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_apcu; \n"
1861
1903
. str_pad ("shmop " , $ padInfo , ' ' , STR_PAD_LEFT ) . " : $ has_shmop; \n"
0 commit comments