3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getXML($url) { $Proxy = getenv("HTTP_PROXY"); if (strlen($Proxy) > 1) { $r_default_context = stream_context_get_default(array('http' => array('proxy' => $Proxy,'request_fulluri' => True,),)); libxml_set_streams_context($r_default_context); } $daten = simplexml_load_file($url); return ($daten); } ini_set("user_agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); ini_set("max_execution_time", 0); ini_set("memory_limit", "10000M"); //These are here to hold back any errors from a user agent sniffer, if applicable. //I only put these here as a precaution and to add things to my code to make it look //like I was doing something important. echo "\t\t\t\t\t",'<div class="row center">',PHP_EOL; //For bootstrap, to wrap the videos up in a row so they can be displayed properly $user = 'KazenRacing'; //Set the username for later use $xml = getXML("http://gdata.youtube.com/feeds/api/users/$user/uploads"); //Loads the users Youtube feed data $total = $xml->totalResults; //This will give you how many videos are available in the feed for ($i=0; $i < $total; $i++){ //For loop determining how many videos to display based on the $total $id = basename($xml->entry[$i]->id); //This gets the id for each video. $title = $xml->entry[$i]->title; //This will get the title for each video. $recorded = date('jS F, Y', strtotime($xml->entry[$i]->recorded)); //This will get the recorded time of each video and display it by Day Month, Year. If not set will display 31st December, 1969 $description= $xml->entry[$i]->content; //This will get the video description, if any. echo "\t\t\t\t\t\t", '<div class="col-md-3 col-sm-6 col-xs-9 yt-div">',PHP_EOL, "\t\t\t\t\t\t\t", '<div class="well well-sm text-center">',PHP_EOL, "\t\t\t\t\t\t\t\t", '<h4>'.$title.'</h4>',PHP_EOL, "\t\t\t\t\t\t\t\t", '<div class="caption">',PHP_EOL, "\t\t\t\t\t\t\t\t\t", '<h5>'.$recorded.'</h5>',PHP_EOL, "\t\t\t\t\t\t\t\t\t",'<a rel="Video Gallery" class="swipebox" href="//youtu.be/'.$id.'" title="'.$title.'">', PHP_EOL, "\t\t\t\t\t\t\t\t\t\t",'<img src="thumbs.php?src=http://img.youtube.com/vi/'.$id.'/mqdefault.jpg&w=256" class="img-responsive img-thumb center-block" alt="'.$title.'"></a>',PHP_EOL, "\t\t\t\t\t\t\t\t\t",'<h6 class="text-justify">'.$description.'</h6>',PHP_EOL, "\t\t\t\t\t\t\t\t",'<hr>',PHP_EOL,//"\t\t\t\t\t\t\t\t\t",'<a href="//youtu.be/'.$id.'" class="btn btn-info btn-outlined" role="button">View on Youtube</a>',PHP_EOL, "\t\t\t\t\t\t\t\t", '</div>',PHP_EOL, "\t\t\t\t\t\t", '</div>', PHP_EOL, "\t\t\t\t\t", '</div>',PHP_EOL; //This echo displays all the information we set before using the $id, $title, $recorded, and $description variables. if ($i % 4 == 3) { echo "\t\t\t\t\t",'</div>',PHP_EOL, "\t\t\t\t\t",'<div class="row">',PHP_EOL; } //This if statement makes sure there is a new row for every four videos. } echo "\t\t\t\t\t",'</div>',PHP_EOL; //And here is the closing tag for our row div. ?>

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.0060.01017.11
8.3.50.0090.01117.64
8.3.40.0120.00319.32
8.3.30.0040.01419.04
8.3.20.0040.00419.07
8.3.10.0030.00620.85
8.3.00.0000.00817.88
8.2.180.0130.00316.88
8.2.170.0090.00622.96
8.2.160.0150.00822.49
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0090.00026.16
8.2.120.0040.00420.27
8.2.110.0040.00721.49
8.2.100.0040.00818.28
8.2.90.0030.00619.59
8.2.80.0040.00418.30
8.2.70.0030.00618.00
8.2.60.0070.00318.30
8.2.50.0060.00318.07
8.2.40.0050.00318.53
8.2.30.0000.00918.46
8.2.20.0040.00418.00
8.2.10.0090.00318.07
8.2.00.0030.00718.21
8.1.280.0100.01325.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00422.73
8.1.230.0040.00821.30
8.1.220.0090.00018.13
8.1.210.0040.00419.29
8.1.200.0050.00517.72
8.1.190.0040.00417.79
8.1.180.0050.00318.10
8.1.170.0000.00819.27
8.1.160.0080.00019.18
8.1.150.0000.00818.95
8.1.140.0040.00417.79
8.1.130.0030.00318.23
8.1.120.0060.00317.80
8.1.110.0000.00817.56
8.1.100.0030.00517.74
8.1.90.0000.00817.78
8.1.80.0040.00417.77
8.1.70.0000.00717.66
8.1.60.0030.00517.75
8.1.50.0060.00317.64
8.1.40.0040.00417.70
8.1.30.0000.00817.88
8.1.20.0060.00317.77
8.1.10.0080.00017.83
8.1.00.0000.00917.80
8.0.300.0040.00420.27
8.0.290.0000.00817.13
8.0.280.0030.00318.75
8.0.270.0040.00417.54
8.0.260.0000.00717.20
8.0.250.0000.00917.21
8.0.240.0080.00417.25
8.0.230.0030.00317.30
8.0.220.0000.00717.21
8.0.210.0050.00517.05
8.0.200.0060.00317.34
8.0.190.0000.00717.12
8.0.180.0030.00617.25
8.0.170.0030.00617.29
8.0.160.0050.00317.20
8.0.150.0040.00417.14
8.0.140.0040.00717.21
8.0.130.0000.00713.80
8.0.120.0000.00817.25
8.0.110.0080.00017.14
8.0.100.0080.00017.13
8.0.90.0040.00417.36
8.0.80.0070.01017.25
8.0.70.0000.00817.21
8.0.60.0040.00417.21
8.0.50.0050.00317.33
8.0.30.0170.00717.24
8.0.20.0090.01117.28
8.0.10.0030.00517.35
8.0.00.0130.01017.30
7.4.330.0050.00013.33
7.4.320.0030.00316.82
7.4.300.0040.00416.92
7.4.290.0050.00216.84
7.4.280.0070.00416.95
7.4.270.0070.00016.85
7.4.260.0030.00313.73
7.4.250.0030.00516.85
7.4.240.0000.00716.94
7.4.230.0040.00416.89
7.4.220.0110.01516.95
7.4.210.0080.01016.92
7.4.200.0060.00316.79
7.4.190.0030.00516.94
7.4.160.0060.01216.77
7.4.150.0040.01816.89
7.4.140.0120.00816.91
7.4.130.0090.00916.98
7.4.120.0050.01416.96
7.4.110.0160.00916.73
7.4.100.0160.00316.85
7.4.90.0100.01017.05
7.4.80.0120.00916.95
7.4.70.0030.01616.66
7.4.60.0060.01116.75
7.4.50.0000.00916.93
7.4.40.0080.00816.78
7.4.30.0150.00316.92
7.4.00.0030.01015.35
7.3.330.0000.00713.69
7.3.320.0000.00513.69
7.3.310.0040.00416.65
7.3.300.0040.00416.65
7.3.290.0060.01216.64
7.3.280.0080.00916.77
7.3.270.0130.00616.69
7.3.260.0050.01816.70
7.3.250.0160.00816.90
7.3.240.0100.01316.75
7.3.230.0110.00816.78
7.3.210.0160.00316.86
7.3.200.0100.01619.39
7.3.190.0130.00616.83
7.3.180.0130.00916.82
7.3.170.0100.00716.86
7.3.160.0090.00816.68
7.3.120.0110.00615.23
7.3.110.0060.01315.12
7.3.100.0140.00015.25
7.3.90.0030.01015.19
7.3.80.0060.00615.02
7.3.70.0100.00715.09
7.3.60.0040.01115.21
7.3.50.0060.00614.89
7.3.40.0030.00915.36
7.3.30.0030.01615.18
7.3.20.0100.00317.11
7.3.10.0070.01016.80
7.3.00.0110.00316.86
7.2.330.0130.00616.74
7.2.320.0150.00317.23
7.2.310.0210.00016.75
7.2.300.0070.01117.17
7.2.290.0070.01016.80
7.2.240.0070.00715.59
7.2.230.0120.00615.18
7.2.220.0070.00714.99
7.2.210.0090.00615.04
7.2.200.0120.00615.39
7.2.190.0070.01015.40
7.2.180.0120.00615.30
7.2.170.0070.01015.22
7.2.160.0060.01315.23
7.2.150.0060.01217.19
7.2.140.0090.00617.10
7.2.130.0060.01017.03
7.2.120.0100.00716.76
7.2.110.0070.01016.82
7.2.100.0100.00816.86
7.2.90.0110.00716.99
7.2.80.0070.01116.99
7.2.70.0050.01316.96
7.2.60.0090.00916.86
7.2.50.0140.00516.90
7.2.40.0080.00717.21
7.2.30.0110.00716.93
7.2.20.0050.01216.77
7.2.10.0080.01017.07
7.2.00.0110.00617.05
7.1.330.0000.01615.70
7.1.320.0000.01716.26
7.1.310.0000.01216.05
7.1.300.0090.00616.23
7.1.290.0030.01416.02
7.1.280.0000.01315.90
7.1.270.0060.00915.89
7.1.260.0070.01015.76
7.1.250.0140.00215.81
7.1.200.0030.00916.28
7.1.70.0030.00617.36
7.1.60.0100.01319.40
7.1.50.0040.00817.35
7.1.00.0030.05722.70
7.0.200.0050.00517.30
7.0.140.0100.06022.38
7.0.120.0070.07322.48
7.0.100.0100.05020.41
7.0.90.0000.04720.46
7.0.80.0100.05020.49
7.0.70.0070.04320.43
7.0.60.0100.03720.52
7.0.50.0100.04720.73
7.0.40.0000.04320.37
7.0.30.0070.05020.39
7.0.20.0030.04720.55
7.0.10.0070.04020.58
7.0.00.0130.03320.55
5.6.280.0030.07321.57
5.6.250.0070.05721.09
5.6.240.0130.03721.01
5.6.230.0030.05021.16
5.6.220.0030.04021.18
5.6.210.0070.03721.13
5.6.200.0130.05021.35
5.6.190.0070.04021.68
5.6.180.0070.04021.32
5.6.170.0030.04321.49
5.6.160.0030.05721.36
5.6.150.0030.04021.64
5.6.140.0130.07021.67
5.6.130.0030.06321.56
5.6.120.0070.07721.45
5.6.110.0030.04021.36
5.6.100.0030.08021.37
5.6.90.0070.08321.35
5.6.80.0200.06720.88
5.6.70.0100.04021.06
5.6.60.0070.07020.86
5.6.50.0030.05020.98
5.6.40.0100.05320.92
5.6.30.0070.07320.92
5.6.20.0070.05320.66
5.6.10.0200.07020.81
5.6.00.0200.07320.66
5.5.380.0030.04320.98
5.5.370.0070.04320.93
5.5.360.0000.04720.73
5.5.350.0170.04720.78
5.5.340.0030.04321.13
5.5.330.0070.04021.31
5.5.320.0000.04321.12
5.5.310.0100.03321.09
5.5.300.0030.05321.27
5.5.290.0070.08021.38
5.5.280.0100.07721.08
5.5.270.0130.07321.29
5.5.260.0100.05321.26
5.5.250.0070.05020.92
5.5.240.0070.04320.77
5.5.230.0100.07320.64
5.5.220.0170.05720.71
5.5.210.0130.04020.80
5.5.200.0170.07020.46
5.5.190.0030.04720.47
5.5.180.0070.04720.59
5.5.160.0100.05720.78
5.5.150.0100.07320.77
5.5.140.0070.04020.59
5.5.130.0170.07720.61
5.5.120.0030.08320.76
5.5.110.0130.07020.65
5.5.100.0100.07720.52
5.5.90.0130.07020.54
5.5.80.0130.07320.64
5.5.70.0100.08320.53
5.5.60.0100.07320.59
5.5.50.0100.06720.37
5.5.40.0130.07020.64
5.5.30.0100.04720.50
5.5.20.0070.06320.52
5.5.10.0130.05020.48
5.5.00.0070.08020.57
5.4.450.0100.06319.65
5.4.440.0030.08019.75
5.4.430.0100.07719.65
5.4.420.0030.07719.69
5.4.410.0070.07319.71
5.4.400.0200.03319.49
5.4.390.0030.08319.55
5.4.380.0030.04719.33
5.4.370.0000.08719.33
5.4.360.0170.07019.57
5.4.350.0130.03719.33
5.4.340.0130.07719.38
5.4.320.0070.08019.51
5.4.310.0070.08019.41
5.4.300.0170.06319.54
5.4.290.0130.06019.32
5.4.280.0070.07719.45
5.4.270.0030.08019.57
5.4.260.0100.08019.51
5.4.250.0070.08019.38
5.4.240.0070.06019.45
5.4.230.0100.07319.51
5.4.220.0070.07719.60
5.4.210.0070.07319.54
5.4.200.0100.06019.59
5.4.190.0100.07719.56
5.4.180.0170.05019.59
5.4.170.0030.03719.61
5.4.160.0100.07019.30
5.4.150.0030.04319.43
5.4.140.0100.07316.90
5.4.130.0030.07716.88
5.4.120.0070.07716.84
5.4.110.0030.06016.93
5.4.100.0030.03716.91
5.4.90.0100.06316.76
5.4.80.0030.07716.75
5.4.70.0030.05016.77
5.4.60.0070.06716.88
5.4.50.0070.03716.88
5.4.40.0030.07316.84
5.4.30.0100.05716.85
5.4.20.0130.04016.65
5.4.10.0130.07016.64
5.4.00.0070.07016.38
5.3.290.0070.07014.97
5.3.280.0070.05714.93
5.3.270.0070.04714.84
5.3.260.0100.07714.86
5.3.250.0030.07714.87
5.3.240.0070.04314.89
5.3.230.0100.07014.95
5.3.220.0100.08014.90
5.3.210.0130.07014.80
5.3.200.0070.03314.81
5.3.190.0070.08014.84
5.3.180.0000.05014.91
5.3.170.0100.07314.91
5.3.160.0070.04314.91
5.3.150.0130.06314.87
5.3.140.0230.05714.89
5.3.130.0170.07014.89
5.3.120.0030.08314.87
5.3.110.0030.07714.77
5.3.100.0070.08314.27
5.3.90.0170.04014.30
5.3.80.0070.08014.35
5.3.70.0100.06314.25
5.3.60.0100.06314.30
5.3.50.0030.04714.32
5.3.40.0070.07714.21
5.3.30.0230.05714.14
5.3.20.0130.05314.04
5.3.10.0030.06013.91
5.3.00.0030.07313.91
5.2.170.0100.06011.63
5.2.160.0000.06011.63
5.2.150.0070.04311.63
5.2.140.0130.05311.63
5.2.130.0030.03311.63
5.2.120.0070.06011.63
5.2.110.0070.05311.63
5.2.100.0030.05311.63
5.2.90.0030.06311.63
5.2.80.0130.03011.63
5.2.70.0000.05711.63
5.2.60.0130.06011.63
5.2.50.0100.06311.63
5.2.40.0030.06011.63
5.2.30.0000.06311.63
5.2.20.0030.05311.63
5.2.10.0000.04711.63
5.2.00.0030.04311.63
5.1.60.0130.04711.63
5.1.50.0070.05311.63
5.1.40.0070.05011.63
5.1.30.0070.05711.63
5.1.20.0130.02311.63
5.1.10.0000.06311.63
5.1.00.0070.05011.63
5.0.50.0130.01711.63
5.0.40.0030.03711.63
5.0.30.0100.06011.63
5.0.20.0000.04011.63
5.0.10.0030.02711.63
5.0.00.0000.06011.63
4.4.90.0000.03711.63
4.4.80.0100.03011.63
4.4.70.0030.03711.63
4.4.60.0000.04011.63
4.4.50.0000.03311.63
4.4.40.0000.05711.63
4.4.30.0030.03011.63
4.4.20.0070.03311.63
4.4.10.0070.03011.63
4.4.00.0030.04311.63
4.3.110.0030.02011.63
4.3.100.0000.03311.63
4.3.90.0000.02311.63
4.3.80.0070.05011.63
4.3.70.0100.02711.63
4.3.60.0030.03711.63
4.3.50.0070.01711.63
4.3.40.0070.02311.63
4.3.30.0000.03311.63
4.3.20.0070.03311.63
4.3.10.0000.04011.63
4.3.00.0030.03311.63

preferences:
68.12 ms | 401 KiB | 5 Q