in reply to My network range
Where you have
you might try this instead (especially if this code gets performed over and over and ove...) :$calculated = 2**(32 - $VALUE[1]);
$calculated = 1 << (32 - $VALUE[1]);
A bit-wise shift, especially in the case where you're dealing with powers of two, would likely be much less computationally expensive that exponentiation via multiplication. (That's my guess-can someone verify this?)
|
|---|