3v4l.org

run code in 300+ PHP versions simultaneously
<?php function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } function storefile() { $filename = "10mb.test"; //$time_start = microtime_float(); $filecontent = file_get_contents("http://v2.ustreamix.com/stream.php?id=movies-thriller"); //$time_end = microtime_float(); //$time = $time_end - $time_start; //$speed = 10 / $time; //echo "File Downloaded with" . $speed . " Mb/s of speed."; apc_store($filename,$filecontent); } function fetchfile() { $filename = "10mb.test"; $file = apc_fetch($filename); $quoted = sprintf('"%s"', addcslashes(basename($filename), '"\\')); $size = filesize($file); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . $quoted); header('Content-Transfer-Encoding: binary'); header('Connection: Keep-Alive'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . $size); echo $file; } storefile(); fetchfile();
Output for 8.0.0 - 8.0.12
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/0l6NS on line 13 Warning: file_get_contents(http://v2.ustreamix.com/stream.php?id=movies-thriller): Failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/0l6NS on line 13 Fatal error: Uncaught Error: Call to undefined function apc_store() in /in/0l6NS:18 Stack trace: #0 /in/0l6NS(40): storefile() #1 {main} thrown in /in/0l6NS on line 18
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.31, 7.4.0 - 7.4.25
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/0l6NS on line 13 Warning: file_get_contents(http://v2.ustreamix.com/stream.php?id=movies-thriller): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/0l6NS on line 13 Fatal error: Uncaught Error: Call to undefined function apc_store() in /in/0l6NS:18 Stack trace: #0 /in/0l6NS(40): storefile() #1 {main} thrown in /in/0l6NS on line 18
Process exited with code 255.
Output for 5.6.0 - 5.6.40
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/0l6NS on line 13 Warning: file_get_contents(http://v2.ustreamix.com/stream.php?id=movies-thriller): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/0l6NS on line 13 Fatal error: Call to undefined function apc_store() in /in/0l6NS on line 18
Process exited with code 255.

preferences:
167.51 ms | 401 KiB | 218 Q