3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userip = $_SERVER['REMOTE_ADDR']; $urlco = 'http://freegeoip.net/json/'.$userip.''; $contentco = file_get_contents($urlco); $jsonco = json_decode($contentco, true); echo "<center><p style='color:white; text-shadow:1px 1px 3px black; font-size:20px;'>Country is"; $jsonco['country_code']; echo "</p></center>"; ?>
Output for git.master, git.master_jit
Warning: Undefined array key "REMOTE_ADDR" in /in/KqIco on line 2 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for freegeoip.net failed: System error in /in/KqIco on line 4 Warning: file_get_contents(http://freegeoip.net/json/): Failed to open stream: php_network_getaddresses: getaddrinfo for freegeoip.net failed: System error in /in/KqIco on line 4 <center><p style='color:white; text-shadow:1px 1px 3px black; font-size:20px;'>Country is Warning: Trying to access array offset on value of type null in /in/KqIco on line 7 </p></center>
Output for rfc.property-hooks
Warning: Undefined array key "REMOTE_ADDR" in /in/KqIco on line 2 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for freegeoip.net failed: System error in /in/KqIco on line 4 Warning: file_get_contents(http://freegeoip.net/json/): Failed to open stream: php_network_getaddresses: getaddrinfo for freegeoip.net failed: System error in /in/KqIco on line 4 <center><p style='color:white; text-shadow:1px 1px 3px black; font-size:20px;'>Country is Warning: Trying to access array offset on null in /in/KqIco on line 7 </p></center>

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:
50.99 ms | 402 KiB | 8 Q