3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $ip = '192.168.21.1 - 192.168.21.254'; $ip = explode('-', $ip); list($lower, $upper) = $ip; $lower_dec = (float) sprintf("%u", ip2long($lower)); $upper_dec = (float) sprintf("%u", ip2long($upper)); echo ($lower_dec); echo ($upper_dec);
Output for 5.2.10 - 7.1.0
00
Output for 5.0.0 - 5.2.9
32322408970
Output for 4.3.0 - 4.4.9
32322408974294967295