static function Helper::ip__mask__long_to_number in Anti Spam by CleanTalk 8.4
Same name and namespace in other branches
- 9.1.x src/lib/Cleantalk/Common/Helper.php \Cleantalk\Common\Helper::ip__mask__long_to_number()
* Converts long mask like 4294967295 to number like 32 * *
Parameters
int $long_mask: * * @return int
1 call to Helper::ip__mask__long_to_number()
- SFW::check in src/
lib/ Cleantalk/ Common/ Firewall/ Modules/ SFW.php - * Use this method to execute main logic of the module. * *
File
- src/
lib/ Cleantalk/ Common/ Helper.php, line 361
Class
- Helper
- CleanTalk Helper class. Compatible with any CMS.
Namespace
Cleantalk\CommonCode
static function ip__mask__long_to_number($long_mask) {
$num_mask = strpos((string) decbin($long_mask), '0');
return $num_mask === false ? 32 : $num_mask;
}