3v4l.org

run code in 300+ PHP versions simultaneously
<?php $salt = substr(str_replace('+', '.', base64_encode(sha1(microtime(true), true))), 0, 22); // 2a is the bcrypt algorithm selector, see http://php.net/crypt // 12 is the workload factor (around 300ms on my Core i7 machine), see http://php.net/crypt $hash = crypt('falcon', '$2a$12$' . $salt); // we can now use the generated hash as the argument to crypt(), since it too will contain $a2$12$... with a variation of the hash. No need to store the salt anymore, just the hash is enough! var_dump($hash == crypt('foo', $hash)); // true var_dump($hash == crypt('falcon', $hash)); // false

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.0030.77214.84
7.3.120.0100.76314.77
7.3.110.0070.76414.78
7.3.100.0000.74314.55
7.3.90.0030.74914.99
7.3.80.0100.73614.69
7.3.70.0070.75314.82
7.3.60.0100.72814.50
7.3.50.0030.74814.59
7.3.40.0030.73314.86
7.3.30.0070.75014.89
7.3.20.0030.74016.54
7.3.10.0030.74716.52
7.3.00.0100.70916.48
7.2.250.0030.74114.99
7.2.240.0030.75414.84
7.2.230.0000.75415.20
7.2.220.0030.74815.21
7.2.210.0030.74015.09
7.2.200.0100.72315.14
7.2.190.0030.75414.59
7.2.180.0000.75114.88
7.2.170.0000.75514.97
7.1.330.0000.75215.36
7.1.320.0030.75516.02
7.1.310.0030.75015.68
7.1.300.0030.74515.72
7.1.290.0070.73815.75
7.1.280.0070.75115.85
7.1.270.0030.72615.77
7.1.260.0030.73715.86
7.1.70.0330.72117.07
7.1.60.0170.81119.40
7.1.50.0100.78816.95
7.1.00.0070.74022.45
7.0.200.0000.73016.73
7.0.140.0070.75321.91
7.0.120.0000.78022.05
7.0.60.0200.82321.88
7.0.50.0130.74017.90
7.0.40.0070.80019.90
7.0.30.0200.82720.02
7.0.20.0330.81020.19
7.0.10.0100.77020.33
7.0.00.0030.79020.01
5.6.280.0100.77021.11
5.6.210.0070.75020.74
5.6.200.0070.83018.12
5.6.190.0000.77320.39
5.6.180.0200.80720.56
5.6.170.0300.83020.52
5.6.160.0070.79020.47
5.6.150.0030.81318.12
5.6.140.0130.81318.22
5.6.130.0070.82718.21
5.6.120.0030.77021.00
5.6.110.0070.82321.01
5.6.100.0070.82320.95
5.6.90.0170.80721.06
5.6.80.0100.82720.42
5.5.350.0270.81320.44
5.5.340.0070.84017.95
5.5.330.0100.84720.22
5.5.320.0230.82020.29
5.5.310.0430.77720.32
5.5.300.0070.82318.02
5.5.290.0000.75717.91
5.5.280.0100.81020.76
5.5.270.0100.79020.84
5.5.260.0100.77320.79
5.5.250.0100.83020.48
5.5.240.0270.82020.26
5.4.450.3670.77019.36
5.4.440.4470.76019.45
5.4.430.3870.74019.47
5.4.420.3970.75319.48
5.4.410.4130.75319.19
5.4.400.3870.76019.16
5.4.390.0030.75319.09
5.4.380.0070.76319.07
5.4.370.3830.76019.04
5.4.360.3930.77019.15
5.4.350.2070.77319.18
5.4.340.4600.75719.13
5.4.320.4230.76019.12
5.4.310.4100.76019.15
5.4.300.3670.74719.06
5.4.290.3370.74718.99
5.4.280.3630.75019.12
5.4.270.3970.76019.15
5.4.260.4230.75718.86
5.4.250.3930.76318.98
5.4.240.3900.75318.97
5.4.230.4170.76318.89
5.4.220.3830.74319.07
5.4.210.3670.74318.89
5.4.200.3970.78719.03
5.4.190.4200.75319.07
5.4.180.3600.74318.85
5.4.170.3870.76018.85
5.4.160.4070.76018.84
5.4.150.3670.75018.88
5.4.140.0000.82716.38
5.4.130.0030.80716.14
5.4.120.3970.74716.43
5.4.110.4000.74016.18
5.4.100.3930.75716.40
5.4.90.0000.77716.13
5.4.80.2130.76716.40
5.4.70.3900.76016.21
5.4.60.3800.74016.30
5.4.50.3200.74716.37
5.4.40.3470.75016.54
5.4.30.3570.75016.36
5.4.20.3770.76716.35
5.4.10.3670.76316.20
5.4.00.4600.74015.87
5.3.290.4530.74714.77
5.3.280.3630.74014.52
5.3.270.3770.73714.58
5.3.260.3770.74714.55
5.3.250.4000.75314.53
5.3.240.1570.75714.62
5.3.230.0030.76014.51
5.3.220.4200.73314.54
5.3.210.3500.76014.52
5.3.200.3930.74314.50
5.3.190.0070.80714.40
5.3.180.0070.79714.38
5.3.170.3870.73714.52
5.3.160.3700.73014.44
5.3.150.4000.74314.46
5.3.140.2430.74314.43
5.3.130.4330.76014.37
5.3.120.3630.75014.42
5.3.110.5900.75714.48
5.3.100.3930.75713.91
5.3.90.4270.72713.97
5.3.80.4000.75014.03
5.3.70.3830.73313.98
5.3.60.4030.74013.82
5.3.50.3570.74713.91
5.3.40.3830.75713.91
5.3.30.3770.75713.70
5.3.20.3800.76713.66
5.3.10.3770.74313.62
5.3.00.3630.74313.57
5.2.170.3370.02711.17
5.2.160.3300.03011.07
5.2.150.3330.02711.01
5.2.140.3330.02711.07
5.2.130.3000.03011.02
5.2.120.3930.03011.00
5.2.110.3230.02710.95
5.2.100.2970.02710.95
5.2.90.3000.02711.03
5.2.80.2970.03010.95
5.2.70.2930.03010.86
5.2.60.3300.03011.05
5.2.50.3070.03011.04
5.2.40.2600.03010.84
5.2.30.2530.02310.98
5.2.20.2500.02710.89
5.2.10.2500.02710.83
5.2.00.2300.02710.67
5.1.60.3200.0279.93
5.1.50.2870.02010.11
5.1.40.3200.0239.93
5.1.30.3200.02710.34
5.1.20.2630.02710.43
5.1.10.3200.02010.04
5.1.00.3870.02710.13
5.0.50.1500.0208.59
5.0.40.1500.0138.36
5.0.30.2030.0308.27
5.0.20.1430.0208.16
5.0.10.1500.0178.22
5.0.00.1470.0508.18
4.4.90.1230.0206.14
4.4.80.1400.0176.14
4.4.70.1530.0176.14
4.4.60.1230.0176.14
4.4.50.1530.0136.14
4.4.40.1670.0276.14
4.4.30.1600.0136.14
4.4.20.1070.0236.14
4.4.10.1770.0136.14
4.4.00.1430.0236.14
4.3.110.1470.0136.14
4.3.100.1430.0136.14
4.3.90.1430.0136.14
4.3.80.1370.0276.14
4.3.70.1500.0136.14
4.3.60.1270.0136.14
4.3.50.1430.0206.14
4.3.40.1200.0276.14
4.3.30.0670.0176.14
4.3.20.0770.0236.14
4.3.10.0770.0276.14
4.3.00.0770.0236.14

preferences:
37.64 ms | 400 KiB | 5 Q