3v4l.org

run code in 300+ PHP versions simultaneously
<?php $SERVER_IP = "185.38.148.147"; //Insert the IP of the server you want to query. $SERVER_PORT = "25581"; //Insert the PORT of the server you want to ping. Needed to get the favicon, motd, players online and players max. etc $QUERY_PORT = "28016"; //Port of query.port="" in your server.properties. Needed for the playerlist! Can be the same like the port or different. Query must be enabled in your server.properties file! $HEADS = "3D"; //"normal" / "3D" $show_max = "unlimited"; // how much playerheads should we display? "unlimited" / "10" / "53"/ ... $SHOW_FAVICON = "on"; //"off" / "on" $ping = json_decode(file_get_contents('http://api.minetools.eu/ping/' . $SERVER_IP . '/' . $SERVER_PORT . ''), true); $query = json_decode(file_get_contents('http://api.minetools.eu/query/' . $SERVER_IP . '/' . $QUERY_PORT . ''), true); if(empty($ping['error'])) { $version = $ping['version']['name']; $online = $ping['players']['online']; $max = $ping['players']['max']; $motd = $ping['description']; $favicon = $ping['favicon']; } if(empty($query['error'])) { $playerlist = $query['Playerlist']; } ?>
Output for git.master, git.master_jit
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for api.minetools.eu failed: System error in /in/sMLUe on line 10 Warning: file_get_contents(http://api.minetools.eu/ping/185.38.148.147/25581): Failed to open stream: php_network_getaddresses: getaddrinfo for api.minetools.eu failed: System error in /in/sMLUe on line 10 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for api.minetools.eu failed: System error in /in/sMLUe on line 11 Warning: file_get_contents(http://api.minetools.eu/query/185.38.148.147/28016): Failed to open stream: php_network_getaddresses: getaddrinfo for api.minetools.eu failed: System error in /in/sMLUe on line 11 Warning: Trying to access array offset on value of type null in /in/sMLUe on line 14 Warning: Trying to access array offset on value of type null in /in/sMLUe on line 14 Warning: Trying to access array offset on value of type null in /in/sMLUe on line 15 Warning: Trying to access array offset on value of type null in /in/sMLUe on line 15 Warning: Trying to access array offset on value of type null in /in/sMLUe on line 16 Warning: Trying to access array offset on value of type null in /in/sMLUe on line 16 Warning: Trying to access array offset on value of type null in /in/sMLUe on line 17 Warning: Trying to access array offset on value of type null in /in/sMLUe on line 18 Warning: Trying to access array offset on value of type null in /in/sMLUe on line 22
Output for rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for api.minetools.eu failed: System error in /in/sMLUe on line 10 Warning: file_get_contents(http://api.minetools.eu/ping/185.38.148.147/25581): Failed to open stream: php_network_getaddresses: getaddrinfo for api.minetools.eu failed: System error in /in/sMLUe on line 10 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for api.minetools.eu failed: System error in /in/sMLUe on line 11 Warning: file_get_contents(http://api.minetools.eu/query/185.38.148.147/28016): Failed to open stream: php_network_getaddresses: getaddrinfo for api.minetools.eu failed: System error in /in/sMLUe on line 11 Warning: Trying to access array offset on null in /in/sMLUe on line 14 Warning: Trying to access array offset on null in /in/sMLUe on line 14 Warning: Trying to access array offset on null in /in/sMLUe on line 15 Warning: Trying to access array offset on null in /in/sMLUe on line 15 Warning: Trying to access array offset on null in /in/sMLUe on line 16 Warning: Trying to access array offset on null in /in/sMLUe on line 16 Warning: Trying to access array offset on null in /in/sMLUe on line 17 Warning: Trying to access array offset on null in /in/sMLUe on line 18 Warning: Trying to access array offset on null in /in/sMLUe on line 22

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:
70.42 ms | 404 KiB | 8 Q