3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); header ("Content-type: text/xml;"); echo '<?xml version="1.0" encoding="utf-8"?>'."\r\n"; echo '<items>'; $token = '603a0a066a8d71427114723059ef5a17fa1068b53d15a078edbe3ffca357e93c965b8ab84bc4c862c2224'; if(isset($_REQUEST['search'])){ if(isset($_REQUEST['offset'])) if(isset($_REQUEST['hd'])) $url = 'http://api.vk.com/method/video.search.xml?q='.$_REQUEST['search'].'&count=200&sort=1'.$_REQUEST['hd'].'&adult=1'.$_REQUEST['offset'].'&access_token='.$token; $html = simpleXML_load_file($url,"SimpleXMLElement",LIBXML_NOCDATA); foreach ($html->video as $item) { $play = $item-> player; $title = $item-> title; $img = $item-> image_medium; echo '<channel><title>'.$title.'</title><description><![CDATA[<table><tr><td style="vertical-align: top"><img src="'.$img.'" height="408" width="410"/><h1></h1></td></tr></table> ]]></description><stream_url><![CDATA['.$play.'&autoplay=1]]></stream_url> </channel>'; }} print("</items>"); $name = $_REQUEST['search']; $page = ob_get_contents(); ob_end_flush(); $fp = fopen("$name.xml","w"); fwrite($fp,$page); fclose($fp); $ftp_server="ftp.byethost10.com"; $ftp_user_name="b10_14110070"; $ftp_user_pass="roja1234"; $file = "$name.xml";//tobe uploaded $remote_file = "/htdocs/s/$name.xml"; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // upload a file if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) { echo "successfully uploaded $file\n"; } else { echo "There was a problem while uploading $file\n"; } // close the connection ftp_close($conn_id); ?> <? $conexion = mysql_connect($mysql_host, $mysql_usuario, $mysql_password, true); $mysql_usuario = 'b10_14110070'; $mysql_password = 'roja1234'; $mysql_host = 'sql207.byethost10.com'; $mysql_database = 'b10_14110070_iptv'; //Seleccionamos la base datos y la conexión. mysql_select_db($mysql_database, $conexion); //Verificamos que no hay ningún error en la conexión if (!$conexion) die('No pudo conectarse: '.mysql_error()); else { //Preparamos la consulta $title = '$name'; $logo_30x30 ='http://www.visual8.co.uk/wp-content/uploads/2013/10/Video-Icon.jpg' ; $description = '$name'; $playlist_url = '$remote_file'; $consulta = "INSERT INTO testme (title, logo_30x30, description, playlist_url)"; $consulta .= "VALUES ('$title', '$logo_30x30', '$description', '$playlist_url')"; //Ejecutamos la consulta $resultado = mysql_query($consulta, $conexion) or die(mysql_error()); echo "<b>ARCHIVO REGISTRADO</b><br><b>nombre:</b> ".$title.", \n <br> <b>logo_30x30:</b> ".$logo_30x30.", \n <br> <b>description:</b> ".$description.", \n <br><br> <b>playlist_url:</b> ".$playlist_url.", \n <br><br>"; } //Cerramos la conexión mysql_close($conexion); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0100.00318.55
8.3.50.0170.00322.06
8.3.40.0000.01518.81
8.3.30.0080.00819.09
8.3.20.0080.00020.35
8.3.10.0050.00320.61
8.3.00.0040.00419.38
8.2.180.0080.00816.75
8.2.170.0060.00922.96
8.2.160.0140.00020.41
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00022.09
8.2.110.0070.00420.53
8.2.100.0100.00318.03
8.2.90.0030.00619.22
8.2.80.0060.00317.97
8.2.70.0000.00817.59
8.2.60.0000.00818.05
8.2.50.0070.00418.07
8.2.40.0040.00418.22
8.2.30.0070.00018.24
8.2.20.0050.00318.04
8.2.10.0050.00318.13
8.2.00.0040.00417.92
8.1.280.0140.00625.92
8.1.270.0040.00423.96
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00023.95
8.1.230.0090.00319.16
8.1.220.0000.00817.89
8.1.210.0040.00418.77
8.1.200.0000.01017.59
8.1.190.0060.00317.48
8.1.180.0000.00818.10
8.1.170.0030.00518.38
8.1.160.0000.00722.07
8.1.150.0040.00418.94
8.1.140.0000.00817.42
8.1.130.0030.00517.51
8.1.120.0050.00317.52
8.1.110.0000.00717.58
8.1.100.0040.00417.46
8.1.90.0080.00017.41
8.1.80.0040.00417.54
8.1.70.0070.00017.39
8.1.60.0060.00317.63
8.1.50.0040.00417.47
8.1.40.0040.00417.56
8.1.30.0030.00517.70
8.1.20.0060.00317.68
8.1.10.0000.00917.54
8.1.00.0040.00417.43
8.0.300.0040.00418.77
8.0.290.0050.00317.00
8.0.280.0070.00018.43
8.0.270.0070.00017.38
8.0.260.0000.00717.07
8.0.250.0000.00717.11
8.0.240.0050.00217.13
8.0.230.0000.00717.13
8.0.220.0000.00716.96
8.0.210.0030.00317.12
8.0.200.0050.00317.00
8.0.190.0080.00317.14
8.0.180.0050.00316.99
8.0.170.0040.00417.03
8.0.160.0000.00817.07
8.0.150.0040.00417.00
8.0.140.0040.00416.96
8.0.130.0000.00613.53
8.0.120.0040.00416.99
8.0.110.0030.00617.10
8.0.100.0040.00417.06
8.0.90.0000.00817.04
8.0.80.0170.00417.02
8.0.70.0050.00417.11
8.0.60.0080.00017.19
8.0.50.0040.00417.13
8.0.30.0110.01117.29
8.0.20.0090.01117.40
8.0.10.0030.00517.07
8.0.00.0070.01016.80
7.4.330.0030.00315.10
7.4.320.0060.00016.67
7.4.300.0000.00616.57
7.4.290.0070.00016.57
7.4.280.0070.00016.57
7.4.270.0030.00316.63
7.4.260.0070.00016.54
7.4.250.0040.00416.57
7.4.240.0040.00416.62
7.4.230.0000.00716.64
7.4.220.0080.01216.67
7.4.210.0120.00816.68
7.4.200.0040.00416.77
7.4.160.0120.00416.69
7.4.150.0120.00817.40
7.4.140.0160.00417.86
7.4.130.0090.00816.64
7.4.120.0120.00616.59
7.4.110.0090.00916.53
7.4.100.0040.01216.55
7.4.90.0150.00516.65
7.4.80.0040.01419.39
7.4.70.0110.00716.57
7.4.60.0130.00316.77
7.4.50.0080.00016.34
7.4.40.0070.01016.59
7.4.30.0100.01016.49
7.4.00.0070.01215.09
7.3.330.0000.00513.46
7.3.320.0030.00313.28
7.3.310.0040.00416.35
7.3.300.0070.00016.34
7.3.290.0180.00316.54
7.3.280.0130.00416.59
7.3.270.0070.01117.40
7.3.260.0100.00716.67
7.3.250.0140.00316.48
7.3.240.0070.01116.55
7.3.230.0150.00316.46
7.3.210.0140.00816.77
7.3.200.0030.01419.39
7.3.190.0150.00616.55
7.3.180.0090.00916.33
7.3.170.0140.00316.49
7.3.160.0110.01516.66
7.3.120.0070.01014.73
7.3.110.0090.00915.16
7.3.100.0080.00515.13
7.3.90.0030.01314.70
7.3.80.0070.00714.75
7.3.70.0030.00614.89
7.3.60.0030.01314.88
7.3.50.0030.00714.77
7.3.40.0000.01614.73
7.3.30.0060.01014.88
7.3.20.0070.00716.83
7.3.10.0070.00716.71
7.3.00.0040.01116.70
7.2.330.0100.01016.54
7.2.320.0070.01116.86
7.2.310.0130.01016.64
7.2.300.0040.01616.75
7.2.290.0060.01216.41
7.2.250.0060.00615.20
7.2.240.0120.00915.05
7.2.230.0070.00714.90
7.2.220.0070.01115.10
7.2.210.0060.01015.13
7.2.200.0100.00715.10
7.2.190.0070.00715.28
7.2.180.0080.00815.14
7.2.170.0130.00315.04
7.2.60.0040.01116.75
7.2.00.0060.00619.69
7.1.330.0030.01315.73
7.1.320.0000.01415.67
7.1.310.0090.00615.80
7.1.300.0060.00915.76
7.1.290.0100.00315.89
7.1.280.0080.00315.94
7.1.270.0080.00315.88
7.1.260.0070.00315.80
7.1.200.0000.01415.84
7.1.100.0030.00918.19
7.1.70.0040.01217.18
7.1.60.0160.01019.32
7.1.50.0100.01316.88
7.1.00.0070.07322.28
7.0.200.0000.00816.83
7.0.140.0170.06022.19
7.0.110.0070.08021.79
7.0.100.0000.06721.71
7.0.90.0070.08021.72
7.0.80.0030.06721.84
7.0.70.0070.08021.71
7.0.60.0070.07721.73
7.0.50.0130.05322.21
7.0.40.0000.08719.93
7.0.30.0030.08320.05
7.0.20.0000.08719.98
7.0.10.0100.07720.04
7.0.00.0070.04720.01
5.6.280.0100.08721.11
5.6.260.0100.07020.72
5.6.250.0070.07320.68
5.6.240.0000.08320.71
5.6.230.0100.07320.68
5.6.220.0100.07320.63
5.6.210.0030.08020.67
5.6.200.0170.06021.11
5.6.190.0130.06721.21
5.6.180.0030.06321.07
5.6.170.0030.08321.13
5.6.160.0070.08020.97
5.6.150.0070.09021.11
5.6.140.0000.07721.07
5.6.130.0000.05320.96
5.6.120.0130.07720.95
5.6.110.0070.06721.09
5.6.100.0070.07721.15
5.6.90.0000.09020.93
5.6.80.0070.07720.50
5.6.70.0030.06720.54
5.6.60.0100.07020.51
5.6.50.0000.08020.50
5.6.40.0030.07720.45
5.6.30.0070.08020.59
5.6.20.0070.07720.30
5.6.10.0000.08320.42
5.6.00.0000.08020.63
5.5.380.0000.08020.54
5.5.370.0100.06720.56
5.5.360.0100.05320.53
5.5.350.0030.08020.52
5.5.340.0030.08321.00
5.5.330.0070.06320.89
5.5.320.0100.07321.01
5.5.310.0030.05320.93
5.5.300.0130.07320.86
5.5.290.0030.07320.83
5.5.280.0070.05320.96
5.5.270.0000.08720.92
5.5.260.0100.07720.97
5.5.250.0000.09020.57
5.5.240.0100.07720.22
5.5.230.0100.04320.24
5.5.220.0070.07720.27
5.5.210.0100.07720.42
5.5.200.0000.07320.39
5.5.190.0030.07320.27
5.5.180.0030.08320.33
5.5.160.0070.07320.15
5.5.150.0100.07320.38
5.5.140.0070.04720.31
5.5.130.0030.08320.38
5.5.120.0070.08020.26
5.5.110.0070.07320.27
5.5.100.0100.07020.03
5.5.90.0070.07320.02
5.5.80.0030.07320.25
5.5.70.0070.06020.15
5.5.60.0070.07320.22
5.5.50.0070.07320.25
5.5.40.0030.07020.00
5.5.30.0000.06319.99
5.5.20.0070.05020.00
5.5.10.0100.07320.20
5.5.00.0030.08020.23
5.4.450.0030.07719.37
5.4.440.0070.10019.60
5.4.430.0000.07719.32
5.4.420.0030.07719.35
5.4.410.0000.08019.23
5.4.400.0030.07319.13
5.4.390.0100.07018.97
5.4.380.0000.05019.12
5.4.370.0000.07719.16
5.4.360.0000.08019.17
5.4.350.0070.07019.08
5.4.340.0070.06319.03
5.4.320.0030.07718.98
5.4.310.0070.06719.20
5.4.300.0100.05719.11
5.4.290.0030.08018.96
5.4.280.0100.07018.93
5.4.270.0070.06719.02
5.4.260.0100.07318.98
5.4.250.0030.07319.00
5.4.240.0030.05018.94
5.4.230.0100.07318.97
5.4.220.0070.07719.00
5.4.210.0100.04319.24
5.4.200.0070.06719.16
5.4.190.0070.07018.98
5.4.180.0100.07018.92
5.4.170.0070.07318.97
5.4.160.0030.07318.98
5.4.150.0030.05319.00
5.4.140.0030.06716.21
5.4.130.0030.05316.43
5.4.120.0070.04316.23
5.4.110.0070.06716.25
5.4.100.0070.06716.50
5.4.90.0030.07716.53
5.4.80.0030.06716.39
5.4.70.0000.07316.52
5.4.60.0030.07316.14
5.4.50.0000.07316.38
5.4.40.0000.07716.52
5.4.30.0030.05016.36
5.4.20.0030.07016.48
5.4.10.0030.07716.38
5.4.00.0000.07315.70
5.3.290.0130.03315.13
5.3.280.0100.07014.93
5.3.270.0130.07314.79
5.3.260.0130.06314.98
5.3.250.0030.07714.88
5.3.240.0100.07314.92
5.3.230.0030.07714.62
5.3.220.0030.07014.82
5.3.210.0070.07314.88
5.3.200.0070.06714.74
5.3.190.0030.08014.74
5.3.180.0030.07715.03
5.3.170.0030.06714.78
5.3.160.0030.07714.92
5.3.150.0000.07714.92
5.3.140.0030.07714.86
5.3.130.0000.08015.00
5.3.120.0030.07315.01
5.3.110.0070.04014.74
5.3.100.0030.07014.23
5.3.90.0100.04714.05
5.3.80.0030.07314.32
5.3.70.0000.08014.15
5.3.60.0130.06714.31
5.3.50.0070.06714.20
5.3.40.0030.07714.18
5.3.30.0000.07314.36
5.3.20.0070.05714.00
5.3.10.0030.05014.02
5.3.00.0070.07014.00
5.2.170.0030.06711.77
5.2.160.0030.06311.77
5.2.150.0030.06011.77
5.2.140.0070.05011.77
5.2.130.0030.06011.77
5.2.120.0000.06011.77
5.2.110.0030.05711.77
5.2.100.0030.06311.77
5.2.90.0030.05011.77
5.2.80.0030.06311.77
5.2.70.0000.05011.77
5.2.60.0000.06711.77
5.2.50.0030.04711.77
5.2.40.0030.05711.77
5.2.30.0000.06711.77
5.2.20.0030.04711.77
5.2.10.0030.06011.77
5.2.00.0000.06011.77
5.1.60.0070.05011.77
5.1.50.0070.03711.77
5.1.40.0030.05311.77
5.1.30.0030.04011.77
5.1.20.0030.02711.77
5.1.10.0000.05711.77
5.1.00.0100.03711.77
5.0.50.0000.03711.77
5.0.40.0070.04011.77
5.0.30.0000.06311.77
5.0.20.0000.02711.77
5.0.10.0000.02711.77
5.0.00.0030.03011.77
4.4.90.0000.03711.77
4.4.80.0030.03311.77
4.4.70.0030.03711.77
4.4.60.0000.03311.77
4.4.50.0030.03311.77
4.4.40.0030.04711.77
4.4.30.0000.03711.77
4.4.20.0030.02311.77
4.4.10.0000.03711.77
4.4.00.0030.05311.77
4.3.110.0030.02711.77
4.3.100.0030.03311.77
4.3.90.0030.02311.77
4.3.80.0000.05311.77
4.3.70.0000.03311.77
4.3.60.0000.01711.77
4.3.50.0000.03711.77
4.3.40.0000.05311.77
4.3.30.0000.03711.77
4.3.20.0000.03011.77
4.3.10.0000.02011.77
4.3.00.0070.01311.77

preferences:
56.24 ms | 401 KiB | 5 Q