Use ++$i over $i++
This slightly improves performance.
This commit is contained in:
1 file changed
+3
-3
+3
-3
@@ -92,11 +92,11 @@ public static function preventBruteForce(string $tool_name, string $username):bo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Increase counters and update timers
|
// Increase counters and update timers
|
||||||
$loginLog['common']['count']++;
|
++$loginLog['common']['count'];
|
||||||
$loginLog['common']['time'] = \time();
|
$loginLog['common']['time'] = \time();
|
||||||
$loginLog['usr'][$hash_user]['count']++;
|
++$loginLog['usr'][$hash_user]['count'];
|
||||||
$loginLog['usr'][$hash_user]['time'] = \time();
|
$loginLog['usr'][$hash_user]['time'] = \time();
|
||||||
$loginLog['ip'][$hash_ip]['count']++;
|
++$loginLog['ip'][$hash_ip]['count'];
|
||||||
$loginLog['ip'][$hash_ip]['time'] = \time();
|
$loginLog['ip'][$hash_ip]['time'] = \time();
|
||||||
|
|
||||||
// Update the log file
|
// Update the log file
|
||||||
|
|||||||
Reference in new issue
Block a user