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.40.0140.00318.70
8.3.30.0070.00719.04
8.3.20.0040.00420.53
8.3.10.0040.00423.78
8.3.00.0080.00022.58
8.2.170.0110.00422.96
8.2.160.0070.00722.15
8.2.150.0090.00024.18
8.2.140.0090.00024.66
8.2.130.0000.00726.16
8.2.120.0050.00319.36
8.2.110.0050.00522.25
8.2.100.0070.00717.53
8.2.90.0000.00818.96
8.2.80.0110.00017.97
8.2.70.0080.00616.96
8.2.60.0000.00817.80
8.2.50.0030.00518.07
8.2.40.0050.00318.09
8.2.30.0040.00417.81
8.2.20.0000.00717.61
8.2.10.0000.00819.41
8.2.00.0040.00417.69
8.1.270.0080.00023.96
8.1.260.0030.00526.35
8.1.250.0050.00328.09
8.1.240.0030.01323.79
8.1.230.0080.00419.21
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.13
8.1.190.0040.00417.40
8.1.180.0000.00818.10
8.1.170.0000.00818.66
8.1.160.0060.00321.90
8.1.150.0040.00418.43
8.1.140.0000.00717.37
8.1.130.0000.00717.82
8.1.120.0070.00017.24
8.1.110.0000.00717.36
8.1.100.0040.00417.31
8.1.90.0000.00717.19
8.1.80.0020.00517.38
8.1.70.0040.00417.30
8.1.60.0040.00417.34
8.1.50.0040.00417.39
8.1.40.0040.00417.41
8.1.30.0030.00617.47
8.1.20.0040.00417.52
8.1.10.0040.00417.32
8.1.00.0080.00017.38
8.0.300.0070.00018.77
8.0.290.0070.00017.04
8.0.280.0030.00318.45
8.0.270.0030.00317.12
8.0.260.0040.00716.67
8.0.250.0070.00017.00
8.0.240.0000.00716.83
8.0.230.0030.00316.95
8.0.220.0070.00016.94
8.0.210.0050.00316.88
8.0.200.0000.00616.94
8.0.190.0070.00017.02
8.0.180.0000.00916.98
8.0.170.0030.00616.92
8.0.160.0040.00416.89
8.0.150.0000.00716.84
8.0.140.0030.00316.89
8.0.130.0030.00313.54
8.0.120.0040.00416.75
8.0.110.0050.00316.81
8.0.100.0000.00716.98
8.0.90.0050.00316.89
8.0.80.0070.01416.81
8.0.70.0040.00416.80
8.0.60.0000.00716.68
8.0.50.0040.00416.82
8.0.30.0090.00917.04
8.0.20.0070.01417.40
8.0.10.0030.00517.03
8.0.00.0160.00516.51
7.4.330.0030.00315.04
7.4.320.0030.00316.41
7.4.300.0000.00616.27
7.4.290.0000.00716.36
7.4.280.0000.00716.36
7.4.270.0030.00316.41
7.4.260.0040.00416.29
7.4.250.0000.00816.41
7.4.240.0000.00716.44
7.4.230.0030.00316.54
7.4.220.0160.00816.41
7.4.210.0040.01016.43
7.4.200.0000.00716.58
7.4.190.0040.00416.43
7.4.160.0150.00616.56
7.4.150.0120.00917.40
7.4.140.0100.00917.86
7.4.130.0090.01316.35
7.4.120.0080.00916.38
7.4.110.0070.01016.42
7.4.100.0060.01116.25
7.4.90.0040.01416.51
7.4.80.0100.00716.41
7.4.70.0030.01216.38
7.4.60.0120.00316.34
7.4.50.0000.00415.98
7.4.40.0070.00722.77
7.4.30.0100.00516.35
7.4.10.0050.00514.62
7.4.00.0040.00914.76
7.3.330.0000.00613.55
7.3.320.0000.00513.36
7.3.310.0030.00516.26
7.3.300.0070.00016.23
7.3.290.0140.00016.18
7.3.280.0070.00716.20
7.3.270.0040.01217.40
7.3.260.0080.01116.20
7.3.250.0130.00816.27
7.3.240.0070.01016.23
7.3.230.0060.00916.39
7.3.210.0160.00616.16
7.3.200.0040.01319.39
7.3.190.0100.00716.34
7.3.180.0060.01416.29
7.3.170.0110.00416.27
7.3.160.0070.00716.35
7.3.130.0000.01814.39
7.3.120.0050.01114.59
7.3.110.0040.01414.52
7.3.100.0070.00414.59
7.3.90.0040.00814.51
7.3.80.0060.00314.80
7.3.70.0120.00314.64
7.3.60.0030.00714.77
7.3.50.0060.00314.72
7.3.40.0030.00714.78
7.3.30.0090.00314.70
7.3.20.0120.00316.62
7.3.10.0040.01116.27
7.3.00.0030.00616.48
7.2.330.0060.01116.37
7.2.320.0070.01016.27
7.2.310.0000.01616.37
7.2.300.0050.01116.50
7.2.290.0100.00716.32
7.2.260.0040.00814.93
7.2.250.0030.01714.52
7.2.240.0080.00614.40
7.2.230.0100.00314.90
7.2.220.0030.01114.73
7.2.210.0070.00714.35
7.2.200.0090.00614.77
7.2.190.0120.00614.64
7.2.180.0030.00715.04
7.2.170.0080.01014.71
7.2.160.0060.00614.66
7.2.150.0060.00816.92
7.2.140.0030.01216.74
7.2.130.0040.01116.93
7.2.120.0100.00316.75
7.2.110.0070.00716.56
7.2.100.0110.00416.64
7.2.90.0070.01116.63
7.2.80.0100.00816.80
7.2.70.0060.01216.67
7.2.60.0060.00616.75
7.2.50.0100.00616.80
7.2.40.0030.01116.73
7.2.30.0060.00916.83
7.2.20.0060.01116.84
7.2.10.0000.00916.63
7.2.00.0000.01118.07
7.1.330.0060.00915.23
7.1.320.0070.00715.48
7.1.310.0000.01215.42
7.1.300.0090.00515.54
7.1.290.0030.00615.69
7.1.280.0030.01015.48
7.1.270.0060.00615.49
7.1.260.0040.00715.55
7.1.250.0040.01115.55
7.1.240.0040.00715.33
7.1.230.0070.00715.31
7.1.220.0070.00715.55
7.1.210.0110.00315.65
7.1.200.0130.00415.54
7.1.190.0070.01115.50
7.1.180.0030.01015.39
7.1.170.0000.01015.50
7.1.160.0080.00415.46
7.1.150.0070.00715.72
7.1.140.0100.00615.63
7.1.130.0040.01415.52
7.1.120.0100.00315.36
7.1.110.0030.00915.31
7.1.100.0000.01216.72
7.1.90.0000.01615.66
7.1.80.0040.01215.50
7.1.70.0020.00916.25
7.1.60.0030.00816.32
7.1.50.0030.01416.45
7.1.40.0030.01015.73
7.1.30.0110.00415.39
7.1.20.0090.00615.46
7.1.10.0070.00415.58
7.1.00.0070.04018.91
7.0.330.0100.00015.15
7.0.320.0100.00315.27
7.0.310.0080.00615.21
7.0.300.0140.00015.18
7.0.290.0040.00715.25
7.0.280.0030.00915.37
7.0.270.0130.00315.17
7.0.260.0100.00615.24
7.0.250.0120.00015.14
7.0.240.0030.01015.27
7.0.230.0080.00815.06
7.0.220.0060.00615.35
7.0.210.0030.00715.24
7.0.200.0080.00716.12
7.0.190.0060.00315.21
7.0.180.0000.01314.90
7.0.170.0040.01115.09
7.0.160.0120.00315.00
7.0.150.0040.00915.32
7.0.140.0050.04218.60
7.0.130.0000.01215.39
7.0.120.0070.00815.38
7.0.110.0050.00515.32
7.0.100.0000.01315.47
7.0.90.0070.00715.17
7.0.80.0040.00415.13
7.0.70.0000.05018.54
7.0.60.0050.04518.47
7.0.50.0060.04318.67
7.0.40.0070.02816.72
7.0.30.0030.04916.69
7.0.20.0100.04516.76
7.0.10.0040.04616.67
7.0.00.0030.02516.82
5.6.400.0030.01314.05
5.6.390.0000.01414.30
5.6.380.0060.00614.32
5.6.370.0100.00314.13
5.6.360.0140.00314.35
5.6.350.0160.00014.26
5.6.340.0030.00913.96
5.6.330.0080.00414.38
5.6.320.0000.01014.20
5.6.310.0060.00614.26
5.6.300.0120.00313.97
5.6.290.0030.01013.70
5.6.280.0020.04317.68
5.6.270.0070.00713.90
5.6.260.0030.01014.10
5.6.250.0120.00313.90
5.6.240.0050.00314.16
5.6.230.0040.01214.23
5.6.220.0090.04017.41
5.6.210.0000.04717.34
5.6.200.0030.03717.37
5.6.190.0050.03917.42
5.6.180.0040.04917.63
5.6.170.0090.04117.50
5.6.160.0070.03817.45
5.6.150.0040.03517.62
5.6.140.0080.03317.38
5.6.130.0050.03517.54
5.6.120.0060.03317.63
5.6.110.0060.04117.65
5.6.100.0080.03817.56
5.6.90.0050.04317.76
5.6.80.0030.04517.27
5.6.70.0060.03517.24
5.6.60.0060.04417.05
5.6.50.0080.02517.43
5.6.40.0020.04817.24
5.6.30.0030.04417.19
5.6.20.0030.03217.24
5.6.10.0050.04317.21
5.6.00.0020.04917.20
5.5.380.0080.00814.10
5.5.370.0070.00413.95
5.5.360.0080.04517.09
5.5.350.0020.04217.24
5.5.340.0040.04617.49
5.5.330.0050.04517.39
5.5.320.0050.04617.23
5.5.310.0100.03317.42
5.5.300.0050.04317.48
5.5.290.0080.03017.47
5.5.280.0030.04717.30
5.5.270.0050.04517.54
5.5.260.0070.04317.34
5.5.250.0050.04317.27
5.5.240.0060.02917.08
5.5.230.0020.04417.20
5.5.220.0100.04017.06
5.5.210.0050.04316.96
5.5.200.0070.02516.99
5.5.190.0000.05117.17
5.5.180.0030.04517.23
5.5.170.0060.00614.06
5.5.160.0080.04016.94
5.5.150.0090.03417.04
5.5.140.0060.03517.16
5.5.130.0050.04516.92
5.5.120.0030.04117.12
5.5.110.0030.02316.91
5.5.100.0120.02316.90
5.5.90.0070.02216.88
5.5.80.0090.02017.02
5.5.70.0030.02217.07
5.5.60.0070.02016.92
5.5.50.0060.01816.98
5.5.40.0060.02016.77
5.5.30.0020.02217.07
5.5.20.0000.02416.95
5.5.10.0040.03017.10
5.5.00.0020.02616.99
5.4.450.0060.04315.27
5.4.440.0010.04515.41
5.4.430.0050.03215.41
5.4.420.0030.04315.33
5.4.410.0020.04515.25
5.4.400.0030.03715.13
5.4.390.0040.02515.33
5.4.380.0060.04315.12
5.4.370.0070.02515.05
5.4.360.0030.04115.26
5.4.350.0080.03315.15
5.4.340.0000.04515.24
5.4.330.0030.00311.25
5.4.320.0020.04115.10
5.4.310.0020.04615.14
5.4.300.0030.04515.15
5.4.290.0010.04915.29
5.4.280.0060.04115.21
5.4.270.0050.02515.23
5.4.260.0020.02615.14
5.4.250.0000.02615.19
5.4.240.0020.02415.21
5.4.230.0020.02015.22
5.4.220.0020.02215.15
5.4.210.0030.02415.14
5.4.200.0030.02015.17
5.4.190.0030.02315.21
5.4.180.0050.01915.09
5.4.170.0040.03315.09
5.4.160.0000.02215.06
5.4.150.0000.01915.21
5.4.140.0050.02013.91
5.4.130.0070.01713.82
5.4.120.0050.02013.90
5.4.110.0040.03013.83
5.4.100.0050.01713.83
5.4.90.0070.01713.85
5.4.80.0020.02013.91
5.4.70.0020.02213.88
5.4.60.0050.01313.82
5.4.50.0030.02013.79
5.4.40.0000.02213.82
5.4.30.0040.03513.83
5.4.20.0020.01913.86
5.4.10.0020.02213.78
5.4.00.0050.01513.63
5.3.290.0100.03712.96
5.3.280.0000.02612.98
5.3.270.0050.02012.99
5.3.260.0040.02112.94
5.3.250.0030.03112.98
5.3.240.0000.02312.94
5.3.230.0040.03712.94
5.3.220.0020.02012.97
5.3.210.0030.01812.93
5.3.200.0010.02312.88
5.3.190.0040.01912.91
5.3.180.0010.01912.88
5.3.170.0010.02012.95
5.3.160.0070.01312.96
5.3.150.0030.01812.91
5.3.140.0030.02112.88
5.3.130.0030.02112.94
5.3.120.0030.01612.90
5.3.110.0030.01812.95
5.3.100.0040.04112.68
5.3.90.0050.01812.66
5.3.80.0020.02012.67
5.3.70.0040.01912.69
5.3.60.0000.02012.58
5.3.50.0040.01912.62
5.3.40.0040.01812.66
5.3.30.0060.01612.62
5.3.20.0000.03512.55
5.3.10.0000.03812.53
5.3.00.0050.01812.42
5.2.170.0070.02012.34
5.2.160.0070.02312.34
5.2.150.0000.03012.34
5.2.140.0000.04712.34
5.2.130.0000.04012.34
5.2.120.0000.02712.34
5.2.110.0000.02312.34
5.2.100.0000.03012.34
5.2.90.0000.02312.34
5.2.80.0000.03012.34
5.2.70.0000.03012.34
5.2.60.0000.03312.34
5.2.50.0000.03012.34
5.2.40.0070.01712.34
5.2.30.0000.03012.34
5.2.20.0000.03012.34
5.2.10.0030.02312.34
5.2.00.0030.02712.34
5.1.60.0000.02712.34
5.1.50.0000.04712.34
5.1.40.0000.02712.34
5.1.30.0070.05312.34
5.1.20.0000.03712.34
5.1.10.0030.05312.34
5.1.00.0070.05012.34
5.0.50.0030.04312.34
5.0.40.0000.04712.34
5.0.30.0000.06012.34
5.0.20.0000.04712.34
5.0.10.0000.04312.34
5.0.00.0030.03012.34
4.4.90.0000.01312.34
4.4.80.0030.02712.34
4.4.70.0000.01312.34
4.4.60.0000.01312.34
4.4.50.0000.01712.34
4.4.40.0000.02312.34
4.4.30.0000.03012.34
4.4.20.0030.03312.34
4.4.10.0030.03312.34
4.4.00.0000.05312.34
4.3.110.0000.03712.34
4.3.100.0070.02012.34
4.3.90.0000.03312.34
4.3.80.0000.03712.34
4.3.70.0000.02012.34
4.3.60.0030.03012.34
4.3.50.0000.03012.34
4.3.40.0000.05012.34
4.3.30.0030.02712.34
4.3.20.0000.02012.34
4.3.10.0070.02312.34
4.3.00.0070.02312.34

preferences:
36.71 ms | 400 KiB | 5 Q