3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Note that the salt here is randomly generated. * Never use a static salt or one that is not randomly generated. * * For the VAST majority of use-cases, let password_hash generate the salt randomly for you */ $options = [ 'cost' => 11, 'salt' => mcrypt_create_iv(MCRYPT_CAST_256, MCRYPT_DEV_URANDOM), ]; echo password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)."\n"; ?>

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.2.60.0120.00316.84
7.2.00.0030.00919.27
7.1.200.0040.00715.65
7.1.100.0060.01017.80
7.1.70.0000.00716.86
7.1.60.0100.01319.12
7.1.50.0070.01416.63
7.1.00.0030.07322.36
7.0.200.0100.00316.71
7.0.60.0030.08720.04
7.0.50.0170.05017.89
7.0.40.0000.06720.40
7.0.30.0330.04320.08
7.0.20.0270.07720.17
7.0.10.0030.05020.05
7.0.00.0100.06320.10
5.6.210.0000.04320.56
5.6.200.0030.04018.08
5.6.190.0070.06720.63
5.6.180.0270.07020.45
5.6.170.0270.05320.62
5.6.160.0030.04020.70
5.6.150.0130.07718.18
5.6.140.0100.04718.18
5.6.130.0030.05718.15
5.6.120.0070.03721.01
5.6.110.0070.08320.88
5.6.100.0030.05721.03
5.6.90.0100.06320.94
5.6.80.0030.08320.40
5.6.70.4600.03720.49
5.5.350.0130.08020.42
5.5.340.0030.04017.92
5.5.330.0100.08020.21
5.5.320.0130.06020.50
5.5.310.0130.04320.23
5.5.300.0030.06017.98
5.5.290.0030.04317.91
5.5.280.0100.04020.77
5.5.270.0100.07020.64
5.5.260.0030.06720.78
5.5.250.0070.06020.58
5.5.240.0070.06720.06
5.4.450.0570.06319.55
5.4.440.0570.05719.36
5.4.430.0600.05019.26
5.4.420.0670.06319.62
5.4.410.0470.06019.41
5.4.400.0570.05018.86
5.4.390.0670.05719.05
5.4.380.0670.05318.86
5.4.370.0670.05719.10
5.4.360.0670.05318.77
5.4.350.0730.03719.07
5.4.340.0530.06019.26
5.4.320.0770.05018.69
5.4.310.0730.04719.10
5.4.300.0570.05019.21
5.4.290.0730.05019.23
5.4.280.0700.05318.95
5.4.270.0800.07019.20
5.4.260.0730.04718.93
5.4.250.0670.05319.06
5.4.240.0630.04318.85
5.4.230.0730.05019.18
5.4.220.0770.05318.89
5.4.210.0670.05319.20
5.4.200.0800.04019.04
5.4.190.0530.06019.25
5.4.180.0600.05019.02
5.4.170.0530.05718.92
5.4.160.0600.05318.73
5.4.150.0670.04719.09
5.4.140.0530.05316.24
5.4.130.0570.04716.36
5.4.120.0530.05016.50
5.4.110.0530.05316.47
5.4.100.0500.05716.18
5.4.90.0500.06316.53
5.4.80.0730.04016.52
5.4.70.0300.05316.42
5.4.60.0230.03716.16
5.4.50.0070.06316.16
5.4.40.0070.05016.27
5.4.30.0000.04016.03
5.4.20.0000.03716.40

preferences:
46.14 ms | 401 KiB | 5 Q