3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $filestring = file_get_contents("http://www.ipdeny.com/ipblocks/data/countries/cn.zone"); $filearray = explode("\n", $filestring); while (list($var, $line) = each($filearray)) { if (!ip_in_range($ipUser, $line)) { die('Muere nigereano'); } }
based on YmBdW
Output for 7.2.0 - 7.3.0rc2
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/0aRvX on line 2 Warning: file_get_contents(http://www.ipdeny.com/ipblocks/data/countries/cn.zone): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/0aRvX on line 2 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /in/0aRvX on line 4 Fatal error: Uncaught Error: Call to undefined function ip_in_range() in /in/0aRvX:5 Stack trace: #0 {main} thrown in /in/0aRvX on line 5
Process exited with code 255.
Output for 7.0.0 - 7.1.20
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/0aRvX on line 2 Warning: file_get_contents(http://www.ipdeny.com/ipblocks/data/countries/cn.zone): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/0aRvX on line 2 Fatal error: Uncaught Error: Call to undefined function ip_in_range() in /in/0aRvX:5 Stack trace: #0 {main} thrown in /in/0aRvX on line 5
Process exited with code 255.
Output for hhvm-3.12.14 - 3.17.3
Warning: Failed to open http://www.ipdeny.com/ipblocks/data/countries/cn.zone (Could not resolve host: www.ipdeny.com) in /in/0aRvX on line 2 Fatal error: Uncaught Error: Call to undefined function ip_in_range() in /in/0aRvX:5 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/0aRvX on line 2 Warning: file_get_contents(http://www.ipdeny.com/ipblocks/data/countries/cn.zone): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/0aRvX on line 2 Fatal error: Call to undefined function ip_in_range() in /in/0aRvX on line 5
Process exited with code 255.