3v4l.org

run code in 300+ PHP versions simultaneously
<?php $links = array ('http://yandex.ru/','http://google.com/','http://rambler.ru','http://www.mail.ru/','http://yahoo.com/', 'http://msn.com/','http://www.yellowpages.ru/', 'http://www.liveinternet.ru/', 'http://www.lenta.ru/','http://www.3.org/' ); function MyCount() { global $links; $file='count.txt'; if(!file_exists($file)){$fp = fopen($file, "w");fwrite($fp,'0');fclose($fp);} $k=(int)file_get_contents($file); $z=$k+1; $countf=fopen($file,"r+"); flock($countf,2); fputs($countf,$z); fclose($countf); $z=($k % count($links)); if ($z==0){$z=count($links);}else {$z=$z-1;} return $z; } function MyList($k) { global $links; $z= count($links)-$k; if ($z<5) { $links2=array_slice($links,($k),$z,true)+array_slice($links,0,(5-$z),true); } else { $links2=array_slice($links,$k,5,true); } return $links2; } function MyListToHTML($list) { $out=''; foreach ($list as $key => $value) { $key2=$key+1; $out.='<tr><th><input id="'.$key2.'" name="'.$key.'" type=checkbox><th><label for="'.$key2.'">'.$value.'</label></tr>'; } return $out; } ?> <html> <head> <script type="text/javascript"> var x;var y; function t(i){return (i<10)?"0"+i:i;} function z(){ var e = new Date(); window.status=t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+" x= "+x+", y= "+y; setTimeout('z()',1); } document.onmousemove=function(){x=event.x;y=event.y;} function s(){ var k=false; var nodeList = document.getElementsByTagName('input'); for (var i = 0; i < nodeList.length; i++) { if(nodeList[i].getAttribute("type") =="checkbox") { if (nodeList[i].checked==true) { k=true; } } } if(!k){alert('Ничего не выбрано');} return k; } </script></head> <body onLoad="z()"> <?php if(isset($_POST['submitMe'])) { echo("Вами были выбраны следующие ссылки:<br>"); foreach ($_POST as $key => $value) { if ($value=='on') echo '<a href="'.$links[$key].'">'.$links[$key].'</a><br>'; } } else { ?> <form name='MyList' method="POST" action="<?=$_SERVER['PHP_SELF']?>" onsubmit="return s();"> <table border=all><col align=center><col align=left> <?php echo MyListToHTML(Mylist(MyCount()));; ?> <tr><th>&nbsp;<th><input type=submit name="submitMe" value="Oк" style="width:200px;"></tr> </table> </form> <? } ?> </body></html>

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.70.0120.00316.73
8.3.60.0080.00816.88
8.3.50.0140.00716.48
8.3.40.0090.00918.71
8.3.30.0070.00718.78
8.3.20.0090.00918.75
8.3.10.0060.00320.55
8.3.00.0060.00319.38
8.2.180.0100.01016.50
8.2.170.0140.00322.96
8.2.160.0110.00618.63
8.2.150.0000.00824.18
8.2.140.0110.00724.66
8.2.130.0080.00026.16
8.2.120.0000.00920.37
8.2.110.0060.00322.23
8.2.100.0110.00017.60
8.2.90.0040.00418.03
8.2.80.0000.00719.34
8.2.70.0050.00317.50
8.2.60.0030.00617.78
8.2.50.0000.00818.07
8.2.40.0000.00718.09
8.2.30.0050.00317.79
8.2.20.0000.00917.48
8.2.10.0040.00417.60
8.2.00.0000.00717.52
8.1.280.0150.00025.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0090.00022.24
8.1.230.0110.00020.95
8.1.220.0040.00417.74
8.1.210.0000.00818.83
8.1.200.0030.00617.23
8.1.190.0000.00717.41
8.1.180.0060.00318.10
8.1.170.0040.00718.62
8.1.160.0050.00218.67
8.1.150.0080.00018.54
8.1.140.0000.00717.20
8.1.130.0050.00317.67
8.1.120.0030.00517.27
8.1.110.0050.00317.33
8.1.100.0040.00417.24
8.1.90.0040.00417.25
8.1.80.0040.00317.24
8.1.70.0000.00717.35
8.1.60.0040.00417.34
8.1.50.0030.00517.35
8.1.40.0000.00717.41
8.1.30.0080.00017.54
8.1.20.0070.00017.54
8.1.10.0050.00317.48
8.1.00.0000.00817.32
8.0.300.0040.00419.89
8.0.290.0000.00716.75
8.0.280.0040.00418.25
8.0.270.0000.00717.24
8.0.260.0040.00416.78
8.0.250.0050.00216.97
8.0.240.0070.00016.93
8.0.230.0000.00716.96
8.0.220.0030.00316.89
8.0.210.0000.00716.84
8.0.200.0040.00416.92
8.0.190.0000.00716.96
8.0.180.0070.00017.00
8.0.170.0060.00316.78
8.0.160.0000.00716.99
8.0.150.0040.00716.90
8.0.140.0000.00816.83
8.0.130.0000.00613.52
8.0.120.0080.00016.87
8.0.110.0000.00716.77
8.0.100.0030.00516.86
8.0.90.0040.00416.79
8.0.80.0070.01016.88
8.0.70.0050.00316.88
8.0.60.0000.00716.86
8.0.50.0000.00716.76
8.0.30.0060.00916.98
8.0.20.0120.01117.03
8.0.10.0050.00316.81
8.0.00.0130.00816.77
7.4.330.0050.00012.98
7.4.320.0000.00816.30
7.4.300.0060.00016.39
7.4.290.0030.00316.47
7.4.280.0040.00416.44
7.4.270.0030.00316.48
7.4.260.0000.00513.44
7.4.250.0040.00416.33
7.4.240.0030.00316.33
7.4.230.0000.00716.52
7.4.220.0230.00316.41
7.4.210.0150.00716.45
7.4.200.0030.00316.27
7.4.190.0070.00016.44
7.4.160.0100.00716.30
7.4.150.0050.01116.32
7.4.140.0110.00616.30
7.4.130.0090.01216.42
7.4.120.0060.01516.32
7.4.110.0090.00916.45
7.4.100.0140.00916.46
7.4.90.0060.01316.27
7.4.80.0130.00316.54
7.4.70.0060.01316.22
7.4.60.0110.00416.32
7.4.50.0030.00316.26
7.4.40.0090.00616.25
7.4.30.0030.01216.31
7.4.10.0100.00714.69
7.4.00.0110.00514.84
7.3.330.0000.00613.51
7.3.320.0000.00613.39
7.3.310.0040.00416.29
7.3.300.0000.00716.22
7.3.290.0090.00916.20
7.3.280.0090.00816.25
7.3.270.0100.00716.12
7.3.260.0130.00316.27
7.3.250.0120.00816.28
7.3.240.0090.01216.42
7.3.230.0090.00916.43
7.3.210.0100.00716.18
7.3.200.0090.00919.39
7.3.190.0130.00316.29
7.3.180.0070.01116.41
7.3.170.0120.00316.38
7.3.160.0040.01216.23
7.3.130.0060.01214.47
7.3.120.0050.01214.90
7.3.110.0090.00914.84
7.3.100.0090.00614.55
7.3.90.0030.01114.73
7.3.80.0070.00314.71
7.3.70.0070.00714.48
7.3.60.0040.01214.80
7.3.50.0090.00914.41
7.3.40.0080.00614.75
7.3.30.0000.01214.56
7.3.20.0060.00916.59
7.3.10.0050.00816.62
7.3.00.0060.00616.67
7.2.330.0030.01416.61
7.2.320.0120.00916.10
7.2.310.0060.01216.39
7.2.300.0080.01116.35
7.2.290.0080.00816.33
7.2.260.0040.01514.76
7.2.250.0110.00714.90
7.2.240.0070.00714.64
7.2.230.0070.00314.83
7.2.220.0070.01014.70
7.2.210.0060.00814.73
7.2.200.0030.01014.54
7.2.190.0030.01714.78
7.2.180.0030.01314.77
7.2.170.0040.01214.82
7.2.160.0090.00915.05
7.2.150.0090.00616.66
7.2.140.0060.00616.61
7.2.130.0060.00816.89
7.2.120.0020.00816.93
7.2.110.0080.00816.84
7.2.100.0110.00416.73
7.2.90.0090.00716.77
7.2.80.0070.00716.84
7.2.70.0030.00816.89
7.2.60.0080.00816.74
7.2.50.0030.00916.84
7.2.40.0050.00716.88
7.2.30.0050.00716.84
7.2.20.0050.00916.81
7.2.10.0050.01016.83
7.2.00.0050.00817.43
7.1.330.0090.00315.41
7.1.320.0030.01115.43
7.1.310.0060.00615.50
7.1.300.0040.01115.61
7.1.290.0000.01315.61
7.1.280.0030.01215.62
7.1.270.0030.01315.43
7.1.260.0070.00415.55
7.1.250.0080.00615.79
7.1.240.0000.01315.43
7.1.230.0080.00415.59
7.1.220.0080.00415.77
7.1.210.0070.00715.26
7.1.200.0070.01015.38
7.1.190.0030.00915.54
7.1.180.0030.01315.64
7.1.170.0090.00915.64
7.1.160.0070.01015.73
7.1.150.0070.00715.57
7.1.140.0090.00315.41
7.1.130.0070.00315.21
7.1.120.0100.00015.36
7.1.110.0030.00615.36
7.1.100.0060.00616.80
7.1.90.0090.00315.57
7.1.80.0040.00415.78
7.1.70.0030.00516.30
7.1.60.0080.01017.51
7.1.50.0070.00716.27
7.1.40.0000.01515.15
7.1.30.0070.00715.50
7.1.20.0000.00815.52
7.1.10.0040.00415.47
7.1.00.0060.01719.04
7.0.330.0060.00615.11
7.0.320.0100.00315.44
7.0.310.0100.00315.35
7.0.300.0100.00715.46
7.0.290.0040.00415.23
7.0.280.0060.00915.13
7.0.270.0030.00715.20
7.0.260.0060.00815.11
7.0.250.0080.00415.16
7.0.240.0030.00915.34
7.0.230.0060.00615.38
7.0.220.0030.00815.32
7.0.210.0000.00815.22
7.0.200.0010.00715.98
7.0.190.0100.00315.10
7.0.180.0100.00015.07
7.0.170.0040.00715.34
7.0.160.0030.00615.23
7.0.150.0030.01215.23
7.0.140.0070.03618.52
7.0.130.0070.00715.26
7.0.120.0050.03718.81
7.0.110.0000.00915.17
7.0.100.0030.01015.19
7.0.90.0060.00615.34
7.0.80.0060.00915.38
7.0.70.0100.00715.34
7.0.60.0080.02217.54
7.0.50.0040.03716.67
7.0.40.0090.05016.90
7.0.30.0200.04316.88
7.0.20.0200.02016.74
7.0.10.0230.04216.86
7.0.00.0110.03716.74
5.6.400.0060.00314.25
5.6.390.0040.00714.29
5.6.380.0080.00014.33
5.6.370.0030.00614.06
5.6.360.0030.01013.97
5.6.350.0080.00814.03
5.6.340.0030.01014.25
5.6.330.0060.00314.11
5.6.320.0070.00314.47
5.6.310.0030.00914.41
5.6.300.0030.00714.05
5.6.290.0060.00614.39
5.6.280.0060.03717.53
5.6.270.0030.00614.17
5.6.260.0060.00614.05
5.6.250.0060.00914.15
5.6.240.0070.00714.32
5.6.230.0100.00313.93
5.6.220.0120.00314.17
5.6.210.0020.04817.38
5.6.200.0090.04216.29
5.6.190.0050.04717.44
5.6.180.0020.04217.23
5.6.170.0260.03217.34
5.6.160.0050.05017.44
5.6.150.0070.03716.29
5.6.140.0050.04616.22
5.6.130.0080.03016.22
5.6.120.0070.02917.74
5.6.110.0090.04417.69
5.6.100.0050.04717.52
5.6.90.0090.02217.62
5.6.80.0090.03517.33
5.6.70.0180.03517.23
5.6.60.0000.01714.08
5.6.50.0000.01314.11
5.6.40.0030.01013.95
5.6.30.0000.01713.82
5.6.20.0090.00914.03
5.6.10.0000.00813.91
5.6.00.0110.00314.13
5.5.380.0000.01114.10
5.5.370.0070.01114.25
5.5.360.0000.01213.97
5.5.350.0160.03717.04
5.5.340.0080.04016.13
5.5.330.0130.03317.05
5.5.320.0050.04517.00
5.5.310.0180.04017.23
5.5.300.0040.02515.82
5.5.290.0110.03816.13
5.5.280.0050.02817.44
5.5.270.0050.04017.22
5.5.260.0080.04417.21
5.5.250.0050.04117.31
5.5.240.0070.04217.22
5.5.230.0070.00414.10
5.5.220.0030.01013.68
5.5.210.0040.00414.14
5.5.200.0100.00314.20
5.5.190.0000.01414.06
5.5.180.0060.01213.88
5.5.170.0040.00714.02
5.5.160.0100.00314.02
5.5.150.0030.01014.02
5.5.140.0070.00713.79
5.5.130.0060.00313.97
5.5.120.0030.00914.16
5.5.110.0000.01613.79
5.5.100.0080.00813.68
5.5.90.0050.00514.30
5.5.80.0070.00714.11
5.5.70.0000.01314.09
5.5.60.0080.00414.00
5.5.50.0060.00913.89
5.5.40.0030.00913.99
5.5.30.0040.00413.76
5.5.20.0030.00914.26
5.5.10.0070.00714.09
5.5.00.0070.00714.03
5.4.450.0060.02315.93
5.4.440.0080.04016.05
5.4.430.0080.02615.85
5.4.420.0050.04015.92
5.4.410.0080.02515.94
5.4.400.0070.03315.84
5.4.390.0190.02115.69
5.4.380.0030.02715.88
5.4.370.0070.03715.88
5.4.360.0020.03415.88
5.4.350.0030.03915.88
5.4.340.0030.02315.80
5.4.330.0000.01112.53
5.4.320.0070.02715.76
5.4.310.0130.02015.84
5.4.300.0050.03315.88
5.4.290.0050.02415.75
5.4.280.0020.04415.72
5.4.270.0070.03915.81
5.4.260.0030.04715.84
5.4.250.0050.02515.70
5.4.240.0050.02515.90
5.4.230.0050.02315.83
5.4.220.0060.02015.84
5.4.210.0030.02515.72
5.4.200.0050.02415.75
5.4.190.0080.03715.80
5.4.180.0060.03515.88
5.4.170.0050.03215.88
5.4.160.0020.02515.84
5.4.150.0120.03815.74
5.4.140.0030.02814.49
5.4.130.0060.02614.46
5.4.120.0050.02014.54
5.4.110.0100.03214.49
5.4.100.0030.04014.44
5.4.90.0050.02714.52
5.4.80.0020.02514.41
5.4.70.0080.02714.45
5.4.60.0050.04014.59
5.4.50.0030.02514.48
5.4.40.0030.04214.46
5.4.30.0050.03914.44
5.4.20.0070.03214.39
5.4.10.0000.03914.39
5.4.00.0070.03714.26
5.3.290.0080.03713.62
5.3.280.0030.02213.57
5.3.270.0050.03713.52
5.3.260.0070.04013.59
5.3.250.0040.04213.58
5.3.240.0050.02513.65
5.3.230.0050.03513.65
5.3.220.0000.03513.57
5.3.210.0070.02213.59
5.3.200.0060.02813.57
5.3.190.0050.02913.56
5.3.180.0080.04013.56
5.3.170.0050.03313.58
5.3.160.0050.02413.56
5.3.150.0050.04113.55
5.3.140.0000.04413.63
5.3.130.0030.04013.63
5.3.120.0080.03813.55
5.3.110.0050.03813.57
5.3.100.0040.04513.30
5.3.90.0030.04113.24
5.3.80.0010.03813.36
5.3.70.0030.02313.25
5.3.60.0050.02813.26
5.3.50.0050.03013.24
5.3.40.0120.02813.28
5.3.30.0020.03113.20
5.3.20.0110.03313.08
5.3.10.0020.03413.13
5.3.00.0030.03713.07
5.2.170.0070.06011.20
5.2.160.0000.06711.16
5.2.150.0000.07311.32
5.2.140.0100.06311.21
5.2.130.0030.06711.18
5.2.120.0100.05011.17
5.2.110.0030.03711.09
5.2.100.0070.05711.18
5.2.90.0070.06011.12
5.2.80.0070.03311.11
5.2.70.0100.05711.25
5.2.60.0000.07010.99
5.2.50.0030.06011.00
5.2.40.0100.06010.91
5.2.30.0030.05310.95
5.2.20.0030.04710.86
5.2.10.0070.03011.05
5.2.00.0000.06310.77
5.1.60.0070.04310.00
5.1.50.0130.02310.17
5.1.40.0000.06010.04
5.1.30.0070.04010.43
5.1.20.0000.03310.32
5.1.10.0030.03010.07
5.1.00.0030.05710.24
5.0.50.0030.0338.91
5.0.40.0030.0438.91
5.0.30.0000.0408.91
5.0.20.0030.0378.91
5.0.10.0030.0438.91
5.0.00.0070.0438.91
4.4.90.0030.0338.91
4.4.80.0030.0338.91
4.4.70.0000.0208.91
4.4.60.0000.0408.91
4.4.50.0030.0178.91
4.4.40.0030.0278.91
4.4.30.0000.0378.91
4.4.20.0070.0108.91
4.4.10.0030.0338.91
4.4.00.0000.0338.91
4.3.110.0030.0238.91
4.3.100.0070.0338.91
4.3.90.0000.0408.91
4.3.80.0000.0278.91
4.3.70.0100.0108.91
4.3.60.0000.0308.91
4.3.50.0000.0308.91
4.3.40.0030.0308.91
4.3.30.0000.0178.91
4.3.20.0070.0138.91
4.3.10.0000.0178.91
4.3.00.0000.0208.91

preferences:
49.73 ms | 401 KiB | 5 Q