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.0100.01018.55
8.3.50.0120.00722.11
8.3.40.0070.00718.82
8.3.30.0090.00618.84
8.3.20.0040.00418.73
8.3.10.0080.00021.07
8.3.00.0040.00423.79
8.2.180.0070.01416.63
8.2.170.0130.00322.96
8.2.160.0030.01020.39
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00321.09
8.2.110.0040.00422.18
8.2.100.0000.01017.59
8.2.90.0050.00319.04
8.2.80.0070.00019.39
8.2.70.0030.00717.46
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0040.00418.16
8.2.30.0030.00519.54
8.2.20.0000.00817.60
8.2.10.0040.00417.49
8.2.00.0040.00717.52
8.1.280.0130.00725.92
8.1.270.0000.00823.99
8.1.260.0100.01026.35
8.1.250.0070.00028.09
8.1.240.0090.00022.42
8.1.230.0080.00320.88
8.1.220.0030.00518.77
8.1.210.0000.00918.89
8.1.200.0030.00617.35
8.1.190.0080.00017.51
8.1.180.0030.00518.10
8.1.170.0040.00418.54
8.1.160.0070.00018.62
8.1.150.0000.00818.59
8.1.140.0030.00617.36
8.1.130.0000.00717.76
8.1.120.0030.00417.36
8.1.110.0070.00017.20
8.1.100.0070.00017.34
8.1.90.0000.00717.34
8.1.80.0040.00417.36
8.1.70.0030.00317.28
8.1.60.0040.00417.45
8.1.50.0030.00517.40
8.1.40.0040.00417.44
8.1.30.0030.00517.41
8.1.20.0040.00417.48
8.1.10.0000.00717.42
8.1.00.0030.00617.33
8.0.300.0060.00319.89
8.0.290.0000.00716.93
8.0.280.0030.00318.25
8.0.270.0000.00817.18
8.0.260.0000.00716.73
8.0.250.0050.00216.94
8.0.240.0030.00617.00
8.0.230.0040.00416.88
8.0.220.0070.00016.89
8.0.210.0040.00416.97
8.0.200.0030.00317.02
8.0.190.0000.00716.92
8.0.180.0000.00816.86
8.0.170.0040.00416.86
8.0.160.0040.00416.81
8.0.150.0000.00716.80
8.0.140.0070.00316.82
8.0.130.0060.00013.55
8.0.120.0000.00816.80
8.0.110.0040.00416.87
8.0.100.0050.00216.75
8.0.90.0070.00016.78
8.0.80.0100.01016.98
8.0.70.0070.00016.88
8.0.60.0000.00716.88
8.0.50.0040.00416.74
8.0.30.0100.01117.01
8.0.20.0110.00817.40
8.0.10.0090.00017.07
8.0.00.0100.01216.63
7.4.330.0000.00516.71
7.4.320.0060.00016.51
7.4.300.0040.00416.39
7.4.290.0030.00316.36
7.4.280.0030.00516.46
7.4.270.0000.00716.39
7.4.260.0000.00513.36
7.4.250.0000.00816.47
7.4.240.0030.00316.50
7.4.230.0040.00416.35
7.4.220.0100.00716.31
7.4.210.0090.00716.39
7.4.200.0030.00316.49
7.4.190.0030.00316.30
7.4.160.0100.01416.10
7.4.150.0100.01617.40
7.4.140.0080.01317.86
7.4.130.0140.00516.35
7.4.120.0100.00716.31
7.4.110.0070.01116.44
7.4.100.0130.00916.29
7.4.90.0070.01416.63
7.4.80.0100.00619.39
7.4.70.0130.00916.23
7.4.60.0100.00616.49
7.4.50.0030.00616.25
7.4.40.0130.00322.77
7.4.30.0040.01416.58
7.4.10.0080.00815.14
7.4.00.0020.01314.88
7.3.330.0000.00513.41
7.3.320.0000.00613.51
7.3.310.0040.00416.33
7.3.300.0030.00316.27
7.3.290.0100.01016.25
7.3.280.0070.00916.18
7.3.270.0080.00817.40
7.3.260.0100.01318.24
7.3.250.0100.00616.35
7.3.240.0030.01316.24
7.3.230.0100.00716.39
7.3.210.0120.00616.23
7.3.200.0040.01419.39
7.3.190.0060.01216.30
7.3.180.0060.00916.29
7.3.170.0100.01316.27
7.3.160.0120.00316.17
7.3.130.0110.00714.47
7.3.120.0050.01114.77
7.3.110.0080.00914.70
7.3.100.0030.00914.81
7.3.90.0050.00914.56
7.3.80.0020.01114.69
7.3.70.0060.00614.62
7.3.60.0020.01214.59
7.3.50.0060.00614.62
7.3.40.0020.01014.53
7.3.30.0040.00914.41
7.3.20.0060.00316.38
7.3.10.0090.00516.43
7.3.00.0080.00516.62
7.2.330.0100.00716.51
7.2.320.0120.01116.24
7.2.310.0090.01316.59
7.2.300.0100.01316.34
7.2.290.0170.00416.39
7.2.260.0090.00614.49
7.2.250.0040.01214.96
7.2.240.0060.00914.76
7.2.230.0090.00615.01
7.2.220.0030.00814.73
7.2.210.0020.01114.94
7.2.200.0080.00314.79
7.2.190.0050.00914.93
7.2.180.0070.00414.63
7.2.170.0090.00514.87
7.2.160.0110.00314.68
7.2.150.0070.00416.66
7.2.140.0060.00616.57
7.2.130.0060.00916.67
7.2.120.0060.00616.84
7.2.110.0090.00316.76
7.2.100.0100.00516.56
7.2.90.0100.00316.80
7.2.80.0090.00716.57
7.2.70.0050.00916.78
7.2.60.0060.01016.84
7.2.50.0150.00116.83
7.2.40.0060.00816.85
7.2.30.0120.00316.50
7.2.20.0100.00516.78
7.2.10.0110.00616.79
7.2.00.0080.00717.60
7.1.330.0030.01115.44
7.1.320.0040.00615.58
7.1.310.0030.01115.48
7.1.300.0070.00315.61
7.1.290.0050.00515.49
7.1.280.0080.00515.51
7.1.270.0060.00715.59
7.1.260.0060.00815.53
7.1.250.0090.00515.55
7.1.240.0100.00315.66
7.1.230.0070.00715.75
7.1.220.0030.01115.68
7.1.210.0060.01115.57
7.1.200.0060.00315.57
7.1.190.0030.01015.55
7.1.180.0090.00615.38
7.1.170.0110.00415.52
7.1.160.0030.01015.51
7.1.150.0060.00615.48
7.1.140.0060.00615.43
7.1.130.0100.00715.45
7.1.120.0080.00015.26
7.1.110.0090.00615.65
7.1.100.0090.00416.76
7.1.90.0070.00715.59
7.1.80.0080.00415.33
7.1.70.0010.00916.33
7.1.60.0110.00817.27
7.1.50.0100.01225.03
7.1.40.0000.01015.52
7.1.30.0110.00315.15
7.1.20.0060.00615.48
7.1.10.0070.00715.59
7.1.00.0030.02019.01
7.0.330.0110.00015.42
7.0.320.0070.01015.29
7.0.310.0030.00915.36
7.0.300.0100.00715.24
7.0.290.0070.00415.04
7.0.280.0000.00915.41
7.0.270.0040.01415.18
7.0.260.0000.01515.26
7.0.250.0000.01715.29
7.0.240.0060.00615.39
7.0.230.0040.00815.43
7.0.220.0040.01115.46
7.0.210.0110.00315.18
7.0.200.0050.00616.12
7.0.190.0000.01015.27
7.0.180.0060.00615.36
7.0.170.0060.00315.34
7.0.160.0040.01115.34
7.0.150.0060.00615.43
7.0.140.0030.04218.52
7.0.130.0090.00615.07
7.0.120.0070.00715.19
7.0.110.0040.01115.36
7.0.100.0070.04317.71
7.0.90.0130.04817.48
7.0.80.0070.04517.71
7.0.70.0110.03917.67
7.0.60.0050.02517.60
7.0.50.0180.04317.87
7.0.40.0090.04716.71
7.0.30.0080.03516.73
7.0.20.0050.04316.74
7.0.10.0050.04016.74
7.0.00.0080.04316.77
5.6.400.0070.00714.05
5.6.390.0030.00814.27
5.6.380.0070.00714.13
5.6.370.0060.00614.07
5.6.360.0070.00314.05
5.6.350.0120.00314.37
5.6.340.0120.00014.25
5.6.330.0030.01313.99
5.6.320.0070.01114.30
5.6.310.0060.00614.19
5.6.300.0040.01214.39
5.6.290.0060.00914.13
5.6.280.0020.04017.46
5.6.270.0030.01414.05
5.6.260.0060.01014.29
5.6.250.0080.03017.45
5.6.240.0020.03217.27
5.6.230.0070.05117.38
5.6.220.0090.03517.48
5.6.210.0100.03717.28
5.6.200.0080.03817.42
5.6.190.0070.04717.67
5.6.180.0080.04417.55
5.6.170.0090.04717.63
5.6.160.0040.03617.62
5.6.150.0120.02517.51
5.6.140.0080.03417.70
5.6.130.0120.02517.69
5.6.120.0070.04117.41
5.6.110.0080.03117.66
5.6.100.0030.03317.71
5.6.90.0130.04017.70
5.6.80.0100.03517.33
5.6.70.0030.04817.24
5.6.60.0050.04217.20
5.6.50.0030.04317.22
5.6.40.0060.03117.33
5.6.30.0080.02017.27
5.6.20.0070.04517.32
5.6.10.0080.02617.26
5.6.00.0080.03817.15
5.5.380.0030.02717.31
5.5.370.0080.02917.12
5.5.360.0050.02517.26
5.5.350.0080.03817.13
5.5.340.0080.04017.41
5.5.330.0050.04217.42
5.5.320.0040.02517.43
5.5.310.0030.03717.60
5.5.300.0050.02917.39
5.5.290.0030.04417.61
5.5.280.0030.04317.51
5.5.270.0110.04317.34
5.5.260.0070.02817.36
5.5.250.0040.04317.42
5.5.240.0050.03817.00
5.5.230.0050.04017.15
5.5.220.0020.04717.06
5.5.210.0050.04717.00
5.5.200.0030.05017.08
5.5.190.0100.03817.13
5.5.180.0030.04617.07
5.5.170.0000.01514.27
5.5.160.0060.03017.09
5.5.150.0000.02617.09
5.5.140.0090.01817.15
5.5.130.0070.02816.98
5.5.120.0050.02316.87
5.5.110.0070.02517.19
5.5.100.0090.02017.08
5.5.90.0050.03116.98
5.5.80.0020.02617.17
5.5.70.0020.02716.91
5.5.60.0050.02717.14
5.5.50.0090.02017.15
5.5.40.0030.02416.96
5.5.30.0090.03017.11
5.5.20.0070.02016.85
5.5.10.0080.01816.91
5.5.00.0040.02116.84
5.4.450.0050.02716.36
5.4.440.0070.02516.35
5.4.430.0030.03616.39
5.4.420.0070.04016.35
5.4.410.0050.04216.15
5.4.400.0030.04116.14
5.4.390.0100.04016.18
5.4.380.0050.02616.11
5.4.370.0070.04216.17
5.4.360.0030.04316.24
5.4.350.0050.03616.14
5.4.340.0070.04316.21
5.4.330.0060.00613.25
5.4.320.0030.02816.19
5.4.310.0040.02216.19
5.4.300.0060.02216.21
5.4.290.0060.02016.05
5.4.280.0050.02516.06
5.4.270.0070.02516.18
5.4.260.0040.02016.15
5.4.250.0030.02416.06
5.4.240.0050.02016.10
5.4.230.0030.02516.20
5.4.220.0060.04116.19
5.4.210.0020.02116.18
5.4.200.0000.02116.13
5.4.190.0090.03216.04
5.4.180.0050.03316.14
5.4.170.0050.03116.19
5.4.160.0100.04216.12
5.4.150.0000.04716.22
5.4.140.0030.02114.83
5.4.130.0000.02514.74
5.4.120.0030.01814.88
5.4.110.0030.02414.90
5.4.100.0000.03514.79
5.4.90.0050.02114.82
5.4.80.0000.02814.86
5.4.70.0030.02314.86
5.4.60.0080.01814.87
5.4.50.0020.02314.85
5.4.40.0060.01814.80
5.4.30.0030.02314.75
5.4.20.0070.01714.82
5.4.10.0060.02014.79
5.4.00.0070.02914.56
5.3.290.0090.02113.93
5.3.280.0000.02513.89
5.3.270.0050.02113.98
5.3.260.0020.02213.97
5.3.250.0060.01914.00
5.3.240.0020.02213.94
5.3.230.0020.02013.90
5.3.220.0020.02413.94
5.3.210.0060.02013.94
5.3.200.0000.02813.91
5.3.190.0040.02113.97
5.3.180.0080.01613.88
5.3.170.0030.02213.88
5.3.160.0020.02713.91
5.3.150.0000.02113.98
5.3.140.0050.02213.91
5.3.130.0010.02013.94
5.3.120.0030.02113.94
5.3.110.0010.02113.93
5.3.100.0000.02513.63
5.3.90.0030.02013.65
5.3.80.0020.02213.59
5.3.70.0030.02113.59
5.3.60.0060.02013.64
5.3.50.0020.02413.57
5.3.40.0020.03213.63
5.3.30.0010.02113.54
5.3.20.0080.01513.42
5.3.10.0030.01813.49
5.3.00.0030.02113.48
5.2.170.0000.03011.25
5.2.160.0030.02311.27
5.2.150.0030.03011.18
5.2.140.0030.03011.21
5.2.130.0030.04011.03
5.2.120.0070.02011.23
5.2.110.0030.03011.21
5.2.100.0030.02711.17
5.2.90.0000.03011.05
5.2.80.0030.02711.11
5.2.70.0030.03011.11
5.2.60.0000.03011.16
5.2.50.0000.04711.09
5.2.40.0030.02710.95
5.2.30.0000.03310.97
5.2.20.0030.02711.04
5.2.10.0030.03710.96
5.2.00.0030.05710.88
5.1.60.0100.04310.00
5.1.50.0000.03010.08
5.1.40.0070.0579.98
5.1.30.0030.03710.29
5.1.20.0030.04710.36
5.1.10.0070.05010.17
5.1.00.0030.04310.05
5.0.50.0100.0338.47
5.0.40.0070.0408.54
5.0.30.0030.0578.34
5.0.20.0030.0408.23
5.0.10.0070.0378.22
5.0.00.0030.0678.09
4.4.90.0030.0108.09
4.4.80.0000.0178.09
4.4.70.0000.0308.09
4.4.60.0000.0208.09
4.4.50.0030.0278.09
4.4.40.0070.0478.09
4.4.30.0000.0308.09
4.4.20.0030.0378.09
4.4.10.0030.0408.09
4.4.00.0000.0438.09
4.3.110.0000.0338.09
4.3.100.0030.0278.09
4.3.90.0030.0308.09
4.3.80.0000.0538.09
4.3.70.0000.0378.09
4.3.60.0030.0238.09
4.3.50.0030.0178.09
4.3.40.0070.0438.09
4.3.30.0000.0278.09
4.3.20.0000.0278.09
4.3.10.0000.0338.09
4.3.00.0030.0338.09

preferences:
74.01 ms | 401 KiB | 5 Q