3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files"; $parent = json_decode(json_encode((array)simplexml_load_string(file_get_contents($url))),1); $content = $parent["folder_content"]; $results = $content["files"]; write("- Files"); $i = 0; foreach ($results as &$file) { $fname = $file[$i]["filename"]; $fkey = $file[$i]["quickkey"]; write("|- File: " . $fname); write(" |-- File Key: " . $fkey); write(' |-- Download: <a href="' . BuildURL($fname, $fkey) . '">Download!</a>'); $i++; } function write($string) { echo $string . "</br>"; } function BuildURL($name, $key) { $template = "https://www.mediafire.com/download/"; $url = $template . $key; $url = $url . "/" . urlencode($name); return $url; } ?>
Output for 8.3.0 - 8.3.6
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.mediafire.com failed: System error in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): Failed to open stream: php_network_getaddresses: getaddrinfo for www.mediafire.com failed: System error in /in/tVCDS on line 4 Warning: Undefined array key "folder_content" in /in/tVCDS on line 5 Warning: Trying to access array offset on null in /in/tVCDS on line 6 - Files</br> Warning: foreach() argument must be of type array|object, null given in /in/tVCDS on line 12
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.mediafire.com failed: System error in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): Failed to open stream: php_network_getaddresses: getaddrinfo for www.mediafire.com failed: System error in /in/tVCDS on line 4 Warning: Undefined array key "folder_content" in /in/tVCDS on line 5 Warning: Trying to access array offset on value of type null in /in/tVCDS on line 6 - Files</br> Warning: foreach() argument must be of type array|object, null given in /in/tVCDS on line 12
Output for 8.0.13 - 8.0.30
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): Failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/tVCDS on line 4 Warning: Undefined array key "folder_content" in /in/tVCDS on line 5 Warning: Trying to access array offset on value of type null in /in/tVCDS on line 6 - Files</br> Warning: foreach() argument must be of type array|object, null given in /in/tVCDS on line 12
Output for 8.0.0 - 8.0.12
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/tVCDS on line 4 Warning: Undefined array key "folder_content" in /in/tVCDS on line 5 Warning: Trying to access array offset on value of type null in /in/tVCDS on line 6 - Files</br> Warning: foreach() argument must be of type array|object, null given in /in/tVCDS on line 12
Output for 7.4.0, 7.4.27 - 7.4.33
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/tVCDS on line 4 Notice: Undefined index: folder_content in /in/tVCDS on line 5 Notice: Trying to access array offset on value of type null in /in/tVCDS on line 6 - Files</br> Warning: Invalid argument supplied for foreach() in /in/tVCDS on line 12
Output for 7.3.32 - 7.3.33, 7.4.26
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/tVCDS on line 4 - Files</br> Warning: Invalid argument supplied for foreach() in /in/tVCDS on line 12
Output for 7.4.3 - 7.4.25
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/tVCDS on line 4 Notice: Undefined index: folder_content in /in/tVCDS on line 5 Notice: Trying to access array offset on value of type null in /in/tVCDS on line 6 - Files</br> Warning: Invalid argument supplied for foreach() in /in/tVCDS on line 12
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/tVCDS on line 4 Notice: Undefined index: folder_content in /in/tVCDS on line 5 - Files</br> Warning: Invalid argument supplied for foreach() in /in/tVCDS on line 12
Output for 7.0.20, 7.1.5 - 7.1.25, 7.2.0 - 7.2.13, 7.3.0 - 7.3.12
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/tVCDS on line 4 Notice: Undefined index: folder_content in /in/tVCDS on line 5 - Files</br> Warning: Invalid argument supplied for foreach() in /in/tVCDS on line 12
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.14, 7.1.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/tVCDS on line 4 Notice: Undefined index: folder_content in /in/tVCDS on line 5 - Files</br> Warning: Invalid argument supplied for foreach() in /in/tVCDS on line 12
Output for 5.2.6 - 5.2.17
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/tVCDS on line 4 Notice: Undefined index: folder_content in /in/tVCDS on line 5 - Files</br> Warning: Invalid argument supplied for foreach() in /in/tVCDS on line 12
Output for 5.2.0 - 5.2.5
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/tVCDS on line 4 Warning: file_get_contents(http://www.mediafire.com/api/folder/get_content.php?folder_key=uetm19hfa6znl&content_type=files): failed to open stream: Connection refused in /in/tVCDS on line 4 Notice: Undefined index: folder_content in /in/tVCDS on line 5 - Files</br> Warning: Invalid argument supplied for foreach() in /in/tVCDS on line 12
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/tVCDS on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /in/tVCDS on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in /in/tVCDS on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/tVCDS on line 12
Process exited with code 255.

preferences:
274.68 ms | 401 KiB | 369 Q