php快速计算子网掩码的前缀长度 $len=0; $netmask="255.255.255.0"; $split_mask=explode('.',$netmask); foreach($split_mask as $v) { ??? $len+=8-log(256-$v,2); } echo $len; ?>