3v4l.org

run code in 300+ PHP versions simultaneously
<?php // include 'conn.php'; // include_once 'tools/curl.php'; if ($_GET['url']) { $url=$_GET['url']; } else { $url="http://free.yoyokiss.com/vod/"; if ($_GET['w']) { $w=$_GET['w']; } else { $w="MP4"; } $html=file_get_contents($url); $html = iconv("gbk", "UTF-8", $html); $pat = "/<a(.*?)href=\"(.*?)\"(.*?)>(.*?".$w.")<\/a>/i"; preg_match_all($pat, $html, $m); $m=($m[2]); if ($_GET[sleep]){ for ($i=0;$i<sizeof($m);$i++) { $t=$m[$i]; echo $t; $md5file='/file/'.md5($t).'.MP4'; echo "<a href=http://$_SERVER[HTTP_HOST]$md5file>播放</a>"; echo " || "; echo "<a href=http://$_SERVER[HTTP_HOST]/tools/curl.php?url=$t>缓存到服务器</a>"; echo "<br>"; } }else if ($_GET[c]) { $ssh_name=date("His").".ssh"; $ssh_path="/usr/local/nginx/html/file/".$ssh_name; $f=fopen($ssh_path,"w"); fwrite ($f,"#!/bin/sh"); fwrite ($f,"\n"); for ($i=0;$i<sizeof($m);$i++) { $t=$m[$i]; if (!file_exists("/usr/local/nginx/html/file/".md5($t).".MP4")) { fwrite ($f,"wget '$t' -O /usr/local/nginx/html/file/".md5($t).".MP4"); fwrite ($f,"\n"); } } fwrite($f,"rm -f ".$ssh_path); fclose($f); exec("chmod 711 $ssh_path"); exec($ssh_path); echo "缓存已提交"; }else{ for ($i=0;$i<sizeof($m);$i++) { $t=$m[$i]; echo $t; $t1=urlencode($t); //转换url //$t2 = iconv("UTF-8", "GB2312", $t); echo "<a href='$t'>播放</a>"; echo " || "; echo "<a href=http://$_SERVER[HTTP_HOST]/tools/curl.php?url=$t>缓存到服务器</a>"; echo "<br>"; $r=mysql_query("select url from vod_zp where url='$t'",$con); if (mysql_num_rows($r)<1){ mysql_query("insert into vod_zp(url,urlen,createtime) values('$t','$t1',now())",$con); } } mysql_close($con); } ?>

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)
5.6.80.0170.07320.38
5.5.240.0030.07020.05
5.4.400.0300.07019.09
5.4.390.0200.06319.25
5.4.380.0230.06319.13
5.4.370.0300.06719.13
5.4.360.0230.05019.11
5.4.350.0300.04319.10
5.4.340.0300.04019.11
5.4.320.0170.05019.09
5.4.310.0270.04718.79
5.4.300.0200.06719.09
5.4.290.0200.05719.09
5.4.280.0300.06719.13
5.4.270.0270.03719.09
5.4.260.0270.06719.08
5.4.250.0330.06718.93
5.4.240.0200.07019.24
5.4.230.0270.05719.09
5.4.220.0200.06719.15
5.4.210.0270.07019.05
5.4.200.0230.04019.07
5.4.190.0370.06019.10
5.4.180.0270.06319.15
5.4.170.0370.03319.24
5.4.160.0300.04318.91
5.4.150.0170.07719.04
5.4.140.0200.05316.34
5.4.130.0230.07316.31
5.4.120.0170.05016.15
5.4.110.0200.03316.34
5.4.100.0170.04716.34
5.4.90.0230.04316.21
5.4.80.0230.04316.46
5.4.70.0300.05716.21
5.4.60.0270.07016.20
5.4.50.0230.06716.40
5.4.40.0300.06716.36
5.4.30.0200.07016.27
5.4.20.0170.07716.05
5.4.10.0170.07016.18
5.4.00.0270.07015.71
5.3.290.0370.06314.53
5.3.280.0200.08014.50
5.3.270.0400.05714.47
5.3.260.0270.07014.58
5.3.250.0200.04314.49
5.3.240.0230.04314.58
5.3.230.0270.06014.57
5.3.220.0230.06714.45
5.3.210.0270.03014.57
5.3.200.0200.04014.62
5.3.190.0200.04714.53
5.3.180.0230.04314.55
5.3.170.0130.04314.57
5.3.160.0200.07714.53
5.3.150.0230.07014.52
5.3.140.0230.04714.53
5.3.130.0200.04314.62
5.3.120.0330.06014.53
5.3.110.0230.04714.42
5.3.100.0230.07013.95
5.3.90.0170.05714.03
5.3.80.0400.05713.88
5.3.70.0230.03014.14
5.3.60.0230.06313.82
5.3.50.0300.04013.75
5.3.40.0170.05713.77
5.3.30.0230.03713.84
5.3.20.0200.06313.57
5.3.10.0230.05713.63
5.3.00.0200.03313.45

preferences:
142.38 ms | 1394 KiB | 7 Q