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); $verify = password_verify("rasmuslerdorf",$hash); var_dump( [ "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.00.0070.00714.79
7.3.120.0060.01114.56
7.3.110.0100.00714.75
7.3.100.0080.00814.77
7.3.90.0040.00714.98
7.3.80.0070.01014.66
7.3.70.0000.01214.96
7.3.60.0080.00314.48
7.3.50.0030.01214.86
7.3.40.0000.01214.52
7.3.30.0070.01014.61
7.3.20.0120.00316.59
7.3.10.0050.00816.46
7.3.00.0050.00716.45
7.2.250.0070.01015.06
7.2.240.0060.01515.03
7.2.230.0040.01214.95
7.2.220.0040.01014.86
7.2.210.0030.01015.14
7.2.200.0060.00314.95
7.2.190.0080.00414.85
7.2.180.0060.00815.01
7.2.170.0070.00714.57
7.2.130.0060.00616.59
7.2.120.0030.00716.77
7.2.110.0030.01316.93
7.2.100.0000.01416.89
7.2.90.0040.00716.64
7.2.80.0060.01016.73
7.2.70.0100.00716.82
7.2.60.0100.00716.53
7.2.50.0030.00716.93
7.2.40.0060.01016.88
7.2.30.0000.01516.96
7.2.20.0030.01416.86
7.2.10.0040.01116.79
7.2.00.0030.01316.74
7.1.330.0040.01415.65
7.1.320.0060.00915.68
7.1.310.0060.00615.68
7.1.300.0030.01015.70
7.1.290.0070.00315.39
7.1.280.0030.01015.68
7.1.270.0030.01015.70
7.1.260.0000.01415.74
7.1.250.0030.00515.73
7.1.240.0100.00315.70
7.1.230.0090.00415.63
7.1.220.0090.00315.71
7.1.210.0070.00715.84
7.1.200.0000.01415.74
7.1.190.0060.00315.61
7.1.180.0040.00415.77
7.1.170.0080.00815.61
7.1.160.0030.01015.79
7.1.150.0090.00615.81
7.1.140.0040.00415.73
7.1.130.0060.00915.55
7.1.120.0060.00615.77
7.1.110.0030.00715.81
7.1.100.0040.00715.70
7.1.90.0060.00915.72
7.1.80.0100.00315.50
7.1.70.0070.01015.72
7.1.60.0030.00515.68
7.1.50.0060.00615.63
7.1.40.0060.00915.71
7.1.30.0000.01015.62
7.1.20.0060.00615.65
7.1.10.0070.00415.43
7.1.00.0000.00815.71
7.0.330.0070.00415.28
7.0.320.0040.01115.36
7.0.310.0030.00915.21
7.0.300.0080.00815.33
7.0.290.0090.00615.15
7.0.280.0000.00915.13
7.0.270.0070.00715.30
7.0.260.0070.00715.45
7.0.250.0070.00315.28
7.0.240.0000.01215.38
7.0.230.0070.01115.25
7.0.220.0070.00715.55
7.0.210.0100.00615.23
7.0.200.0070.00715.36
7.0.190.0030.01115.51
7.0.180.0050.00515.38
7.0.170.0090.00015.44
7.0.160.0040.00815.28
7.0.150.0030.00915.11
7.0.140.0060.00915.34
7.0.130.0050.00215.40
7.0.120.0000.01015.23
7.0.110.0080.00415.29
7.0.100.0000.01215.46
7.0.90.0000.01515.50
7.0.80.0070.00715.29
7.0.70.0090.00315.23
7.0.60.0090.00615.13
7.0.50.0030.00615.45
7.0.40.0060.00913.25
7.0.30.0070.00713.13
7.0.20.0040.00413.54
7.0.10.0030.00913.07
7.0.00.0000.01013.41
5.6.380.0000.00814.17
5.6.370.0060.00613.91
5.6.360.0060.00614.38
5.6.350.0030.00613.89
5.6.340.0030.00913.95
5.6.330.0000.01514.09
5.6.320.0000.01013.91
5.6.310.0070.00714.34
5.6.300.0070.00714.40
5.6.290.0070.00714.16
5.6.280.0070.00313.91
5.6.270.0030.00914.22
5.6.260.0000.01313.80
5.6.250.0030.00713.84
5.6.240.0050.00314.00
5.6.230.0000.01013.91
5.6.220.0030.00714.13
5.6.210.0060.00613.90
5.6.200.0070.00713.86
5.6.190.0100.00314.05
5.6.180.0160.00013.99
5.6.170.0030.01013.78
5.6.160.0040.00814.21
5.6.150.0060.00614.03
5.6.140.0070.00314.11
5.6.130.0070.00714.28
5.6.120.0080.00514.07
5.6.110.0060.00814.23
5.6.100.0060.00614.11
5.6.90.0020.01314.02
5.6.80.0070.00714.14
5.6.70.0090.00513.97
5.6.60.0030.01014.08
5.6.50.0080.00813.96
5.6.40.0070.00413.98
5.6.30.0040.01014.00
5.6.20.0020.01013.85
5.6.10.0040.00914.10
5.6.00.0060.00613.98
5.5.380.0070.00410.68
5.5.370.0030.01010.80
5.5.360.0000.00710.57
5.5.350.0070.00311.01
5.5.340.0040.00710.86
5.5.330.0050.00010.89
5.5.320.0060.00610.43
5.5.310.0030.00710.60
5.5.300.0060.00610.84
5.5.290.0030.00710.75
5.5.280.0030.00911.01
5.5.270.0040.00510.99
5.5.260.0060.00310.78
5.5.250.0050.00710.66
5.5.240.0030.00610.75
5.5.230.0060.00610.76
5.5.220.0080.00510.67
5.5.210.0070.00410.78
5.5.200.0000.00910.82
5.5.190.0060.00410.58
5.5.180.0030.00810.71
5.5.170.0050.00712.58
5.5.160.0040.00410.87
5.5.150.0060.00510.65
5.5.140.0090.00310.81
5.5.130.0080.00210.60
5.5.120.0010.01010.53
5.5.110.0060.00210.87
5.5.100.0070.00310.84
5.5.90.0000.01010.91
5.5.80.0040.00510.54
5.5.70.0040.00610.82
5.5.60.0040.00710.88
5.5.50.0060.00310.71
5.5.40.0060.00610.66
5.5.30.0030.00610.78
5.5.20.0040.00710.81
5.5.10.0060.00410.70
5.5.00.0000.00810.78
5.4.450.0020.00710.82
5.4.440.0020.00910.87
5.4.430.0060.00510.79
5.4.420.0040.00510.78
5.4.410.0020.00610.90
5.4.400.0050.00510.80
5.4.390.0050.00610.66
5.4.380.0080.00310.75
5.4.370.0020.00810.63
5.4.360.0060.00310.69
5.4.350.0070.00010.76
5.4.340.0040.00410.81
5.4.330.0040.00510.62
5.4.320.0060.00510.83
5.4.310.0060.00310.73
5.4.300.0050.00510.80
5.4.290.0050.00410.50
5.4.280.0020.00910.85
5.4.270.0110.00010.89
5.4.260.0050.00510.86
5.4.250.0070.00410.57
5.4.240.0040.00810.77
5.4.230.0030.00510.91
5.4.220.0090.00310.87
5.4.210.0070.00410.87
5.4.200.0000.00810.76
5.4.190.0060.00310.79
5.4.180.0080.00510.88
5.4.170.0050.00710.96
5.4.160.0000.01110.82
5.4.150.0060.00310.91
5.4.140.0080.00310.80
5.4.130.0040.00910.73
5.4.120.0060.00510.83
5.4.110.0040.00610.79
5.4.100.0080.00310.60
5.4.90.0090.00110.55
5.4.80.0050.00610.87
5.4.70.0040.00410.74
5.4.60.0030.00910.92
5.4.50.0060.00410.80
5.4.40.0060.00410.61
5.4.30.0070.00210.78
5.4.20.0070.00510.83
5.4.10.0070.00510.77
5.4.00.0020.00810.74

preferences:
34.51 ms | 400 KiB | 5 Q