3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ip = '127.0.0.1'; $long = ip2long($ip); var_dump($ip); var_dump($long); var_dump(is_string($ip)); var_dump(is_string($long)); var_dump(intval($ip) === $ip); // Detect whether the IP was already a long.
Output for 5.3.18 - 7.2.0
string(9) "127.0.0.1" int(2130706433) bool(true) bool(false) bool(false)