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(256, MCRYPT_DEV_URANDOM), ]; $hash = password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)."\n"; $verify = password_verify("rasmuslerdorf",$hash); print_r( [ "hash" => $hash, "verify" => $verify ]); ?>

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.10.0060.00914.95
7.4.00.0070.00714.73
7.3.130.0040.01514.76
7.3.120.0070.01014.70
7.3.110.0080.01014.81
7.3.100.0070.00814.93
7.3.90.0050.00914.92
7.3.80.0070.01114.55
7.3.70.0080.00714.83
7.3.60.0060.01114.92
7.3.50.0070.00914.70
7.3.40.0030.00814.62
7.3.30.0070.00714.64
7.3.20.0040.00916.76
7.3.10.0050.00816.76
7.3.00.0060.00816.77
7.2.260.0140.00414.87
7.2.250.0090.00814.85
7.2.240.0040.01114.89
7.2.230.0070.00914.96
7.2.220.0060.00814.90
7.2.210.0020.01214.95
7.2.200.0030.01214.89
7.2.190.0100.00814.91
7.2.180.0090.00814.89
7.2.170.0100.00714.76
7.2.160.0110.00614.86
7.2.150.0060.00616.81
7.2.140.0070.00516.80
7.2.130.0040.00916.83
7.2.120.0020.01216.78
7.2.110.0090.00516.63
7.2.100.0030.01216.73
7.2.90.0060.00916.84
7.2.80.0080.00516.89
7.2.70.0080.00616.46
7.2.60.0050.00916.76
7.2.50.0060.00616.68
7.2.40.0080.00416.64
7.2.30.0060.00716.70
7.2.20.0050.01216.77
7.2.10.0070.01216.82
7.2.00.0050.00917.69
7.1.330.0060.00815.64
7.1.320.0050.00815.61
7.1.310.0040.00715.49
7.1.300.0020.01415.67
7.1.290.0080.00615.60
7.1.280.0070.00515.62
7.1.270.0100.00315.70
7.1.260.0050.00915.64
7.1.250.0070.00715.77
7.1.240.0030.01115.78
7.1.230.0100.00315.50
7.1.220.0070.00715.60
7.1.210.0000.01715.57
7.1.200.0060.00615.71
7.1.190.0090.00215.58
7.1.180.0060.00415.57
7.1.170.0080.00715.62
7.1.160.0040.01315.59
7.1.150.0050.00715.50
7.1.140.0050.01015.77
7.1.130.0050.00815.61
7.1.120.0080.00815.71
7.1.110.0050.00815.69
7.1.100.0060.01116.33
7.1.90.0080.00715.73
7.1.80.0050.00815.71
7.1.70.0070.00516.11
7.1.60.0030.01016.78
7.1.50.0070.00815.92
7.1.40.0050.00815.86
7.1.30.0030.01015.55
7.1.20.0060.00515.78
7.1.10.0030.01015.69
7.1.00.0080.02617.86
7.0.330.0050.01015.38
7.0.320.0080.00315.48
7.0.310.0050.00715.26
7.0.300.0030.00515.37
7.0.290.0060.00615.19
7.0.280.0090.00515.28
7.0.270.0070.00815.26
7.0.260.0040.00715.18
7.0.250.0020.00815.43
7.0.240.0050.00815.36
7.0.230.0030.01015.16
7.0.220.0050.00515.35
7.0.210.0020.01015.31
7.0.200.0070.00615.77
7.0.190.0020.01115.39
7.0.180.0040.00815.26
7.0.170.0050.00815.06
7.0.160.0050.00815.25
7.0.150.0050.00715.38
7.0.140.0100.00615.35
7.0.130.0030.00515.32
7.0.120.0030.01015.45
7.0.110.0060.00315.38
7.0.100.0020.01015.05
7.0.90.0050.00615.25
7.0.80.0020.01115.25
7.0.70.0030.01015.30
7.0.60.0060.02817.47
7.0.50.0040.12116.10
7.0.40.0060.11915.43
7.0.30.0150.10015.63
7.0.20.0140.11815.60
7.0.10.0030.11115.68
7.0.00.0070.10115.67
5.6.400.0110.00313.87
5.6.390.0070.00714.17
5.6.380.0090.00514.03
5.6.370.0020.01114.10
5.6.360.0120.00314.17
5.6.350.0030.00913.94
5.6.340.0030.00913.93
5.6.330.0020.01014.14
5.6.320.0080.00514.01
5.6.310.0050.00713.91
5.6.300.0060.00514.14
5.6.290.0070.00714.21
5.6.280.0080.00514.21
5.6.270.0080.00314.03
5.6.260.0080.00314.13
5.6.250.0050.00514.19
5.6.240.0040.00814.11
5.6.230.0070.00914.15
5.6.220.0050.00513.99
5.6.210.0060.02816.41
5.6.200.0070.10915.37
5.6.190.0080.11516.32
5.6.180.0170.11516.26
5.6.170.0110.09516.30
5.6.160.0000.10416.30
5.6.150.0080.10515.41
5.6.140.0100.10115.56
5.6.130.0010.12315.54
5.6.120.0040.11916.54
5.6.110.0070.11916.34
5.6.100.0060.10316.28
5.6.90.0070.10516.49
5.6.80.0020.10916.09
5.6.70.0080.00613.99
5.6.60.0090.00513.94
5.6.50.0070.00713.91
5.6.40.0070.00513.93
5.6.30.0070.00713.96
5.6.20.0020.01114.09
5.6.10.0060.00714.13
5.6.00.0080.00814.24
5.5.380.0070.00413.88
5.5.370.0040.01113.93
5.5.360.0050.00813.89
5.5.350.1450.02216.14
5.5.340.0090.11715.26
5.5.330.0100.11115.97
5.5.320.0160.09916.13
5.5.310.0040.10716.02
5.5.300.0050.10015.36
5.5.290.0110.11515.07
5.5.280.0070.11616.24
5.5.270.0090.11116.36
5.5.260.0030.09916.13
5.5.250.0060.10816.21
5.5.240.0040.08416.08
5.5.230.0080.00613.77
5.5.220.0060.00613.84
5.5.210.0080.00713.97
5.5.200.0020.01313.82
5.5.190.0060.00713.95
5.5.180.0030.00814.08
5.5.170.0090.00514.06
5.5.160.0080.00814.01
5.5.150.0050.00814.12
5.5.140.0050.01214.02
5.5.130.0030.01213.55
5.5.120.0050.00714.07
5.5.110.0030.01113.80
5.5.100.0090.00513.82
5.5.90.0050.00914.02
5.5.80.0060.00613.88
5.5.70.0020.01413.85
5.5.60.0050.00813.92
5.5.50.0060.00713.89
5.5.40.0100.00713.96
5.5.30.0030.01013.87
5.5.20.0090.00713.82
5.5.10.0050.01014.12
5.5.00.0020.00714.01
5.4.450.0430.07319.18
5.4.440.0330.04719.42
5.4.430.0470.06019.43
5.4.420.0530.07319.17
5.4.410.0500.06319.14
5.4.400.0670.05319.04
5.4.390.0630.06719.21
5.4.380.0500.07719.11
5.4.370.0570.07019.12
5.4.360.0470.07319.02
5.4.350.0530.05019.13
5.4.340.0530.06319.12
5.4.320.0500.04319.09
5.4.310.0600.04319.11
5.4.300.0400.04018.83
5.4.290.0470.03319.08
5.4.280.0370.04019.11
5.4.270.0400.03719.12
5.4.260.0400.03318.99
5.4.250.0330.04019.00
5.4.240.0370.03719.01
5.4.230.0300.03718.95
5.4.220.0300.04718.94
5.4.210.0330.04018.95
5.4.200.0300.06019.11
5.4.190.0330.04019.11
5.4.180.0400.04719.08
5.4.170.0530.06019.00
5.4.160.0500.03719.02
5.4.150.0370.04019.11
5.4.140.0600.06316.27
5.4.130.0530.06316.31
5.4.120.0470.03316.41
5.4.110.0500.05016.21
5.4.100.0430.04716.25
5.4.90.0470.04016.36
5.4.80.0400.06316.45

preferences:
40.08 ms | 401 KiB | 5 Q