3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $json = file_get_contents('http://query.fakaheda.eu/93.91.250.135:27872.feed'); $obj = json_decode($json, true); if($obj == null){ echo('Nejde získat informace'); return; }else{ $players = $obj->players; $max_players = $obj->slots; if(players != 0){ echo('Na serveru nikdo není!'); }else{ echo('Hračů na serveru: '.$players.'/'.$slots); } } ?>
based on ihAgn
Output for 7.0.20, 7.1.5 - 7.2.6
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/c8b87 on line 2 Warning: file_get_contents(http://query.fakaheda.eu/93.91.250.135:27872.feed): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/c8b87 on line 2 Nejde získat informace
Output for 5.5.0 - 7.0.10, 7.1.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/c8b87 on line 2 Warning: file_get_contents(http://query.fakaheda.eu/93.91.250.135:27872.feed): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/c8b87 on line 2 Nejde získat informace