3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $tracking_no = "EM909320015MY"; $url = "http://wwww.17track.net/r/handlertrack.ashx?callback=callback&num=" . $tracking_no; $json_query = file_get_contents($url); $json = json_decode($json_query); foreach($json->{'dat'}->{'z1'} as $row) { echo $row->{"a"} . "<br>"; echo $row->{"c"} . "<br>"; echo $row->{"z"} . "<br><br><br>"; }
based on 7up4n
Output for 7.2.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/Ap846 on line 7 Warning: file_get_contents(http://wwww.17track.net/r/handlertrack.ashx?callback=callback&num=EM909320015MY): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/Ap846 on line 7 Notice: Trying to get property 'dat' of non-object in /in/Ap846 on line 11 Notice: Trying to get property 'z1' of non-object in /in/Ap846 on line 11 Warning: Invalid argument supplied for foreach() in /in/Ap846 on line 11
Output for 5.3.19 - 5.4.45, 5.5.33, 5.6.18 - 5.6.19, 7.0.4, 7.0.20, 7.1.5 - 7.1.10
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/Ap846 on line 7 Warning: file_get_contents(http://wwww.17track.net/r/handlertrack.ashx?callback=callback&num=EM909320015MY): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/Ap846 on line 7 Notice: Trying to get property of non-object in /in/Ap846 on line 11 Notice: Trying to get property of non-object in /in/Ap846 on line 11 Warning: Invalid argument supplied for foreach() in /in/Ap846 on line 11
Output for 5.5.24 - 5.5.32, 5.5.34 - 5.6.17, 5.6.20 - 7.0.3, 7.0.5 - 7.0.6, 7.1.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/Ap846 on line 7 Warning: file_get_contents(http://wwww.17track.net/r/handlertrack.ashx?callback=callback&num=EM909320015MY): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/Ap846 on line 7 Notice: Trying to get property of non-object in /in/Ap846 on line 11 Notice: Trying to get property of non-object in /in/Ap846 on line 11 Warning: Invalid argument supplied for foreach() in /in/Ap846 on line 11