3v4l.org

run code in 300+ PHP versions simultaneously
<?php $user_ip = getenv('REMOTE_ADDR'); $geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip")); $city = $geo["geoplugin_city"]; $region = $geo["geoplugin_regionName"]; $country = $geo["geoplugin_countryName"]; echo "City: ".$city."<br>"; echo "Region: ".$region."<br>"; echo "Country: ".$country."<br>"; /* geoplugin_request geoplugin_status geoplugin_credit geoplugin_city geoplugin_region geoplugin_areaCode geoplugin_dmaCode geoplugin_countryCode geoplugin_countryName geoplugin_continentCode geoplugin_latitude geoplugin_longitude geoplugin_regionCode geoplugin_regionName geoplugin_currencyCode geoplugin_currencySymbol geoplugin_currencySymbol_UTF8 geoplugin_currencyConverter */ ?>
Output for git.master, git.master_jit
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.geoplugin.net failed: System error in /in/H7cVk on line 3 Warning: file_get_contents(http://www.geoplugin.net/php.gp?ip=): Failed to open stream: php_network_getaddresses: getaddrinfo for www.geoplugin.net failed: System error in /in/H7cVk on line 3 Warning: Trying to access array offset on value of type bool in /in/H7cVk on line 4 Warning: Trying to access array offset on value of type bool in /in/H7cVk on line 5 Warning: Trying to access array offset on value of type bool in /in/H7cVk on line 6 City: <br>Region: <br>Country: <br>
Output for rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.geoplugin.net failed: System error in /in/H7cVk on line 3 Warning: file_get_contents(http://www.geoplugin.net/php.gp?ip=): Failed to open stream: php_network_getaddresses: getaddrinfo for www.geoplugin.net failed: System error in /in/H7cVk on line 3 Warning: Trying to access array offset on false in /in/H7cVk on line 4 Warning: Trying to access array offset on false in /in/H7cVk on line 5 Warning: Trying to access array offset on false in /in/H7cVk on line 6 City: <br>Region: <br>Country: <br>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
54.54 ms | 402 KiB | 8 Q