You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bench.php
+8-10Lines changed: 8 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ function print_pre($msg) {
59
59
error_reporting(E_ERROR | E_WARNING | E_PARSE);
60
60
61
61
// Check XDebug
62
-
$xdebug = ini_get('xdebug.default_enable');
62
+
$xdebug = (int)ini_get('xdebug.default_enable');
63
63
if ($xdebug) {
64
64
print_pre('<<< ERROR >>> You need to disable Xdebug extension! It greatly slow things down!'.PHP_EOL);
65
65
exit(1);
@@ -68,22 +68,20 @@ function print_pre($msg) {
68
68
69
69
// Check OpCache
70
70
if (php_sapi_name() != 'cli') {
71
-
$opcache = ini_get('opcache.enable');
71
+
$opcache = (int)ini_get('opcache.enable');
72
72
if ($opcache) {
73
-
print_pre('<<< ERROR >>> You need to disable OpCache extension! It may affect results greatly! Make it via .htaccess, VHost or fpm config'.PHP_EOL);
74
-
exit(1);
73
+
print_pre('<<< WARNING >>> You may need to disable OpCache extension! It may affect results greatly! Make it via .htaccess, VHost or fpm config'.PHP_EOL);
75
74
}
76
75
} else {
77
-
$opcache = ini_get('opcache.enable_cli');
76
+
$opcache = (int)ini_get('opcache.enable_cli');
78
77
if ($opcache) {
79
-
print_pre('<<< ERROR >>> You need to disable Cli OpCache extension! It may affect results greatly! Run php with param: -dopcache.enable_cli=0'.PHP_EOL);
80
-
exit(1);
78
+
print_pre('<<< WARNING >>> You may need to disable Cli OpCache extension! It may affect results greatly! Run php with param: -dopcache.enable_cli=0'.PHP_EOL);
81
79
}
82
80
}
83
81
84
-
$mbover = ini_get('mbstring.func_overload');
85
-
if ($mbover== 2) {
86
-
print_pre('<<< ERROR >>> You need to disable mbstring string functions overloading! It greatly slow things down! And messes with results.'.PHP_EOL);
82
+
$mbover = (int)ini_get('mbstring.func_overload');
83
+
if ($mbover!= 0) {
84
+
print_pre('<<< ERROR >>> You must disable mbstring string functions overloading! It greatly slow things down! And messes with results.'.PHP_EOL);
0 commit comments