3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(0); $max = 4; $length = 2; $time_start = getmicrotime(); $charset=sprintf('%s', implode('',array_merge(range('0', '9'))));//,range('A', 'Z')))).'~`!@#$%^&*()-_\/\'";:,.+=<>? '; while ($length < $max + 1) { $time_check = getmicrotime(); $time = $time_check - $time_start; printf("Checking passwords with length: %s\nRuntime: %s seconds\n", $length, $time); for ($i = 0;$i < strlen($charset);$i++) $a[] = $charset{$i}; for ($i = 0, $c = "", $d = "chk(";$i < $length;$i++) { $c.= "foreach(\$a as \$b[$i])"; $d.= "\$b[$i]."; } echo($c . $d . "\"\");"); $length++; } function chk($e){ printf("%s\r", $e); } function getmicrotime() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } ?>

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.0090.00914.95
7.3.120.0140.00015.06
7.3.110.0070.01014.85
7.3.100.0080.00514.78
7.3.90.0060.00314.88
7.3.80.0060.00914.53
7.3.70.0060.00914.81
7.3.60.0030.01014.94
7.3.50.0030.01414.61
7.3.40.0060.00914.86
7.3.30.0090.00614.65
7.3.20.0030.01216.62
7.3.10.0070.01016.45
7.3.00.0000.01416.71
7.2.250.0070.01015.26
7.2.240.0030.01614.86
7.2.230.0030.00914.96
7.2.220.0060.00615.23
7.2.210.0090.00615.34
7.2.200.0070.01015.29
7.2.190.0030.01314.89
7.2.180.0060.01215.13
7.2.170.0040.01115.08
7.2.00.0060.00619.53
7.1.330.0030.01215.79
7.1.320.0030.01015.84
7.1.310.0000.01615.71
7.1.300.0000.01415.74
7.1.290.0070.01015.63
7.1.280.0070.00715.96
7.1.270.0100.00715.68
7.1.260.0080.00816.05
7.1.70.0000.00717.32
7.1.60.0030.02319.32
7.1.50.0090.01316.68
7.1.00.0070.07322.35
7.0.200.0030.00616.56
7.0.140.0070.06322.21
7.0.60.0100.07319.90
7.0.50.0070.04017.86
7.0.40.0030.07720.20
7.0.30.0330.04320.20
7.0.20.0200.05320.12
7.0.10.0130.05320.06
7.0.00.0000.07320.22
5.6.280.0100.06720.94
5.6.210.0070.08320.56
5.6.200.0030.06318.18
5.6.190.0030.04720.57
5.6.180.0170.09320.68
5.6.170.0330.08020.47
5.6.160.0030.04020.52
5.6.150.0100.08018.14
5.6.140.0030.04018.29
5.6.130.0000.04718.14
5.6.120.0030.08720.95
5.6.110.0170.07021.12
5.6.100.0100.08321.12
5.6.90.0030.04020.98
5.6.80.0030.08020.52
5.5.350.0170.07720.36
5.5.340.0000.05718.05
5.5.330.0200.07720.31
5.5.320.0330.07720.27
5.5.310.0270.07320.34
5.5.300.0100.03017.98
5.5.290.0100.06318.03
5.5.280.0170.07320.68
5.5.270.0130.04320.67
5.5.260.0070.08320.80
5.5.250.0100.07320.59
5.5.240.0170.08320.29
5.4.450.0630.06719.48
5.4.440.0630.06719.61
5.4.430.0070.05719.48
5.4.420.0670.00019.41
5.4.410.0630.00019.31
5.4.400.0630.00019.08
5.4.390.0630.00019.07
5.4.380.0670.00019.02
5.4.370.0630.00019.02
5.4.360.0670.00019.16
5.4.350.0670.00019.07
5.4.340.0060.04212.03
5.4.320.0090.03812.52
5.4.310.0050.04212.52
5.4.300.0070.03512.52
5.4.290.0080.03412.52
5.4.280.0060.03412.42
5.4.270.0020.03812.41
5.4.260.0070.03612.41
5.4.250.0040.03912.42
5.4.240.0060.03512.41
5.4.230.0100.03712.41
5.4.220.0060.04112.41
5.4.210.0050.03512.40
5.4.200.0060.03712.40
5.4.190.0080.04112.40
5.4.180.0030.03912.41
5.4.170.0090.03212.41
5.4.160.0080.03312.41
5.4.150.0060.03512.41
5.4.140.0100.03412.09
5.4.130.0070.04012.07
5.4.120.0070.03712.03
5.4.110.0050.03912.03
5.4.100.0060.03712.03
5.4.90.0060.03812.03
5.4.80.0060.03512.03
5.4.70.0060.03312.02
5.4.60.0040.03612.02
5.4.50.0030.03712.02
5.4.40.0090.03012.02
5.4.30.0050.03612.01
5.4.20.0070.03412.01
5.4.10.0050.04712.01
5.4.00.0080.04111.50
5.3.290.0070.03712.80
5.3.280.0060.04212.71
5.3.270.0040.04412.72
5.3.260.0080.03612.72
5.3.250.0030.03912.72
5.3.240.0050.04612.72
5.3.230.0060.04212.71
5.3.220.0060.03612.68
5.3.210.0060.03912.68
5.3.200.0050.03612.68
5.3.190.0050.03812.68
5.3.180.0110.03312.67
5.3.170.0100.04012.67
5.3.160.0090.03112.68
5.3.150.0060.03712.67
5.3.140.0050.03512.66
5.3.130.0060.03612.66
5.3.120.0070.04112.66
5.3.110.0090.03712.66
5.3.100.0080.04412.14
5.3.90.0060.03612.12
5.3.80.0060.03512.11
5.3.70.0080.04012.11
5.3.60.0080.03312.09
5.3.50.0060.03512.04
5.3.40.0120.03712.04
5.3.30.0070.03212.00
5.3.20.0050.03911.79
5.3.10.0070.03811.75
5.3.00.0080.03811.73
5.2.170.0030.0319.24
5.2.160.0020.0399.23
5.2.150.0080.0299.24
5.2.140.0050.0309.23
5.2.130.0030.0299.19
5.2.120.0040.0299.20
5.2.110.0040.0339.20
5.2.100.0060.0299.20
5.2.90.0060.0279.20
5.2.80.0020.0329.19
5.2.70.0070.0339.19
5.2.60.0080.0339.15
5.2.50.0040.0329.12
5.2.40.0090.0359.09
5.2.30.0090.0329.07
5.2.20.0020.0309.06
5.2.10.0080.0328.98
5.2.00.0050.0318.84
5.1.60.0030.0248.13
5.1.50.0070.0218.13
5.1.40.0040.0248.11
5.1.30.0070.0238.45
5.1.20.0040.0268.48
5.1.10.0030.0268.21
5.1.00.0030.0278.20
5.0.50.0020.0226.69
5.0.40.0050.0186.55
5.0.30.0050.0376.36
5.0.20.0050.0276.34
5.0.10.0020.0206.32
5.0.00.0060.0286.32
4.4.90.0010.0194.78
4.4.80.0010.0174.75
4.4.70.0030.0184.75
4.4.60.0030.0144.76
4.4.50.0030.0204.77
4.4.40.0080.0244.70
4.4.30.0030.0184.76
4.4.20.0050.0154.84
4.4.10.0040.0164.85
4.4.00.0060.0304.76
4.3.110.0060.0124.67
4.3.100.0000.0184.66
4.3.90.0030.0144.64
4.3.80.0030.0294.61
4.3.70.0010.0154.63
4.3.60.0050.0204.63
4.3.50.0010.0164.63
4.3.40.0010.0324.56
4.3.30.0020.0223.36
4.3.20.0020.0193.35
4.3.10.0020.0183.30
4.3.00.0000.0237.51

preferences:
37.17 ms | 401 KiB | 5 Q