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> $end

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.0140.00716.74
8.3.50.0150.00322.04
8.3.40.0110.00719.00
8.3.30.0090.00919.10
8.3.20.0060.00320.52
8.3.10.0070.00023.65
8.3.00.0040.00420.83
8.2.180.0150.00616.75
8.2.170.0140.00722.96
8.2.160.0070.00722.26
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00422.02
8.2.110.0070.00321.95
8.2.100.0110.00017.78
8.2.90.0050.00318.80
8.2.80.0060.00317.97
8.2.70.0000.00817.50
8.2.60.0060.00317.91
8.2.50.0050.00318.07
8.2.40.0040.00419.45
8.2.30.0040.00417.83
8.2.20.0050.00217.46
8.2.10.0030.00517.52
8.2.00.0070.00017.61
8.1.280.0070.00725.92
8.1.270.0050.00523.83
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0070.00323.79
8.1.230.0110.00018.97
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0000.00817.41
8.1.180.0050.00318.10
8.1.170.0090.00018.50
8.1.160.0040.00421.84
8.1.150.0070.00018.51
8.1.140.0040.00417.25
8.1.130.0070.00017.76
8.1.120.0000.00717.38
8.1.110.0000.00717.27
8.1.100.0000.00717.33
8.1.90.0070.00017.34
8.1.80.0030.00317.31
8.1.70.0030.00317.21
8.1.60.0080.00417.35
8.1.50.0000.00917.38
8.1.40.0000.00817.42
8.1.30.0040.00417.57
8.1.20.0000.00817.54
8.1.10.0070.00017.48
8.1.00.0030.00617.26
8.0.300.0030.00318.77
8.0.290.0000.00717.04
8.0.280.0000.00718.29
8.0.270.0030.00317.07
8.0.260.0030.00316.81
8.0.250.0060.00017.03
8.0.240.0000.00716.98
8.0.230.0070.00016.98
8.0.220.0040.00416.87
8.0.210.0000.00816.90
8.0.200.0060.00017.02
8.0.190.0070.00017.02
8.0.180.0030.00516.95
8.0.170.0040.00416.86
8.0.160.0070.00016.87
8.0.150.0040.00416.90
8.0.140.0030.00316.78
8.0.130.0000.00613.49
8.0.120.0040.00416.92
8.0.110.0050.00316.92
8.0.100.0020.00516.80
8.0.90.0000.00716.90
8.0.80.0090.00616.91
8.0.70.0000.00716.94
8.0.60.0070.00016.74
8.0.50.0040.00416.92
8.0.30.0100.00816.84
8.0.20.0130.00717.40
8.0.10.0040.00416.88
8.0.00.0100.00816.69
7.4.330.0020.00215.02
7.4.320.0000.00616.35
7.4.300.0000.00616.26
7.4.290.0030.00316.32
7.4.280.0000.00816.35
7.4.270.0030.00316.46
7.4.260.0030.00316.34
7.4.250.0000.00716.33
7.4.240.0020.00516.45
7.4.230.0070.00016.34
7.4.220.0090.00916.42
7.4.210.0030.01116.54
7.4.200.0070.00016.55
7.4.190.0000.00816.51
7.4.160.0040.01216.39
7.4.150.0110.00717.40
7.4.140.0070.01217.86
7.4.130.0100.00716.21
7.4.120.0110.00816.37
7.4.110.0110.00616.28
7.4.100.0100.00616.28
7.4.90.0070.01016.22
7.4.80.0070.01016.29
7.4.70.0130.01216.32
7.4.60.0090.00916.31
7.4.50.0030.00516.40
7.4.40.0060.00822.77
7.4.30.0140.00316.61
7.4.00.0030.01014.93
7.3.330.0050.00013.36
7.3.320.0030.00313.50
7.3.310.0000.00716.21
7.3.300.0030.00316.25
7.3.290.0030.01016.21
7.3.280.0130.00516.23
7.3.270.0080.00817.40
7.3.260.0060.01516.26
7.3.250.0100.00716.23
7.3.240.0100.01316.44
7.3.230.0080.00816.39
7.3.210.0070.01016.21
7.3.200.0060.01419.39
7.3.190.0130.00616.38
7.3.180.0040.01116.36
7.3.170.0070.01316.33
7.3.160.0170.00716.36
7.3.120.0100.00714.45
7.2.330.0060.01116.27
7.2.320.0130.00316.50
7.2.310.0130.00316.29
7.2.300.0070.01416.54
7.2.290.0070.01016.25
7.2.00.0030.01019.27
7.1.100.0030.01017.80
7.1.70.0090.00617.07
7.1.60.0000.02419.29
7.1.50.0140.01017.03
7.1.00.0100.07022.45
7.0.200.0060.00916.73
7.0.140.0030.07321.95
7.0.60.0170.07721.87
7.0.50.0100.07317.96
7.0.40.0100.03720.30
7.0.30.0500.08320.16
7.0.20.0270.07720.16
7.0.10.0170.07720.17
7.0.00.0170.05020.25
5.6.280.0030.07320.93
5.6.210.0070.04020.52
5.6.200.0130.07018.19
5.6.190.0030.04720.61
5.6.180.3400.05020.52
5.6.170.0400.07020.56
5.6.160.0000.08020.54
5.6.150.0130.03318.14
5.6.140.0000.04318.23
5.6.130.0030.07718.18
5.6.120.0030.06020.98
5.6.110.0070.05020.98
5.6.100.0130.06320.90
5.6.90.0000.04721.14
5.6.80.0000.04320.39
5.5.350.3430.04320.45
5.5.340.0070.04018.02
5.5.330.0070.04020.40
5.5.320.0230.03720.28
5.5.310.0270.07320.32
5.5.300.0100.07718.05
5.5.290.0030.06318.04
5.5.280.0130.07320.88
5.5.270.0200.07720.89
5.5.260.0130.07320.90
5.5.250.0070.04020.69
5.5.240.0300.07020.29
5.4.450.0170.04019.34
5.4.440.0300.06019.32
5.4.430.0300.04719.46
5.4.420.0330.06719.17
5.4.410.0330.06019.19
5.4.400.0430.05318.85
5.4.390.0330.05018.88
5.4.380.0270.04318.88
5.4.370.0270.05718.94
5.4.360.0270.06319.16
5.4.350.0200.06319.08
5.4.340.0270.05319.06
5.4.320.0270.05019.23
5.4.310.0230.06019.09
5.4.300.0300.04718.94
5.4.290.0270.06318.86
5.4.280.0330.06719.16
5.4.270.0270.06319.21
5.4.260.0200.06318.97
5.4.250.0200.03719.15
5.4.240.0330.06319.21
5.4.230.0270.05318.99
5.4.220.0330.05019.23
5.4.210.0200.04018.94
5.4.200.0230.03719.05
5.4.190.0270.04319.20
5.4.180.0300.04319.08
5.4.170.0300.03319.15
5.4.160.0330.05019.06
5.4.150.0230.07019.20
5.4.140.0330.06016.38
5.4.130.0330.05016.56
5.4.120.0270.07016.50
5.4.110.0270.05716.60
5.4.100.0270.06316.33
5.4.90.0330.06016.59
5.4.80.0230.07716.59
5.4.70.0200.06016.60
5.4.60.0230.04716.34
5.4.50.0370.04016.48
5.4.40.0270.06716.43
5.4.30.0300.06316.32
5.4.20.0270.06716.34
5.4.10.0230.07016.50
5.4.00.0270.06715.76
5.3.290.0270.03314.65
5.3.280.0330.05714.73
5.3.270.0270.05314.55
5.3.260.0330.05014.71
5.3.250.0270.03714.84
5.3.240.0400.06314.63
5.3.230.0370.06714.70
5.3.220.0300.06714.65
5.3.210.0230.07014.48
5.3.200.0270.07014.74
5.3.190.0330.04314.63
5.3.180.0300.06014.58
5.3.170.0330.05714.80
5.3.160.0200.04014.59
5.3.150.0230.06714.59
5.3.140.0500.02714.62
5.3.130.0230.07714.49
5.3.120.0330.06314.49
5.3.110.0270.07714.53
5.3.100.0270.06714.48
5.3.90.0230.04014.48
5.3.80.0270.06714.48
5.3.70.0300.05714.48
5.3.60.0270.04714.48
5.3.50.0170.04314.48
5.3.40.0200.05014.48
5.3.30.0400.06014.48
5.3.20.0370.06014.48
5.3.10.0200.04314.48
5.3.00.0270.05314.48
5.2.170.0300.05314.48
5.2.160.0200.04014.48
5.2.150.0230.03014.48
5.2.140.0200.04014.48
5.2.130.0170.03014.48
5.2.120.0230.03714.48
5.2.110.0200.04714.48
5.2.100.0170.06014.48
5.2.90.0200.06014.48
5.2.80.0230.03014.48
5.2.70.0130.03014.48
5.2.60.0170.02714.48
5.2.50.0200.02714.48
5.2.40.0200.03714.48
5.2.30.0100.03714.48
5.2.20.0170.03714.48
5.2.10.0130.04014.48
5.2.00.0270.05014.48
5.1.60.0270.04014.48
5.1.50.0200.05014.48
5.1.40.0130.04014.48
5.1.30.0170.03714.48
5.1.20.0200.05014.48
5.1.10.0230.04314.48
5.1.00.0130.04314.48
5.0.50.0030.04014.48
5.0.40.0070.02714.48
5.0.30.0070.04014.48
5.0.20.0100.02014.48
5.0.10.0070.04314.48
5.0.00.0070.04314.48
4.4.90.0070.01314.48
4.4.80.0100.03014.48
4.4.70.0070.02314.48
4.4.60.0100.03714.48
4.4.50.0100.03714.48
4.4.40.0100.05314.48
4.4.30.0100.03714.48
4.4.20.0200.03014.48
4.4.10.0070.03314.48
4.4.00.0130.05314.48
4.3.110.0070.02014.48
4.3.100.0100.01714.48
4.3.90.0170.02014.48
4.3.80.0100.03014.48
4.3.70.0100.02014.48
4.3.60.0100.03314.48
4.3.50.0100.03314.48
4.3.40.0070.03714.48
4.3.30.0100.02014.48
4.3.20.0030.03714.48
4.3.10.0070.03314.48
4.3.00.0130.02314.48

preferences:
44.24 ms | 401 KiB | 5 Q