3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* nul byte (\u0000) safe password hashing function based on password_hash (uses "bcrypt" algorithm). * Source : https://paragonie.com/blog/2016/02/how-safely-store-password-in-2016 by CiPHPCoder * Code: @Florent_ATo */ function safePasswordHash($password) { return password_hash( base64_encode( hash('sha384', $password, false) ), PASSWORD_BCRYPT, array('cost' => 12) ); } $password = '*********password-longer-than-72-characters-and-with-\0-sequence*********'; print safePasswordHash($password); ?>

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)
8.1.130.0030.23219.15
8.1.120.0030.23219.25
8.1.110.0000.23619.14
8.1.100.0000.23319.27
8.1.90.0000.23619.23
8.1.80.0030.22919.27
8.1.70.0030.22919.22
8.1.60.0030.22919.36
8.1.50.0030.23219.45
8.1.40.0000.23519.42
8.1.30.0030.23619.50
8.1.20.0070.23017.68
8.1.10.0100.22717.39
8.1.00.0030.23417.37
8.0.260.0030.23416.95
8.0.250.0000.23418.56
8.0.240.0030.23418.73
8.0.230.0000.23418.51
8.0.220.0130.22018.53
8.0.210.0070.22718.53
8.0.200.0030.23318.61
8.0.190.0000.23518.56
8.0.180.0000.23418.60
8.0.170.0000.23518.64
8.0.160.0100.23318.52
8.0.150.0100.23116.95
8.0.140.0100.23016.95
8.0.130.0100.22916.95
8.0.120.0100.23216.95
8.0.110.0070.23116.95
8.0.100.0000.23816.95
8.0.90.0100.23016.95
8.0.80.0130.22616.95
8.0.70.0100.22916.95
8.0.60.0100.23016.95
8.0.50.0070.23516.95
8.0.30.0100.23016.95
8.0.20.0100.22716.95
8.0.10.0070.22716.95
8.0.00.0000.23816.95
7.4.330.0220.21516.95
7.4.320.0100.23216.95
7.4.300.0100.23116.95
7.4.290.0100.23316.95
7.4.280.0100.23116.95
7.4.270.0130.22716.95
7.4.260.0070.23416.95
7.4.250.0070.23316.95
7.4.240.0130.22716.95
7.4.230.0200.22216.95
7.4.220.0070.23616.95
7.4.210.0160.22316.95
7.4.200.0070.23316.95
7.4.190.0130.22616.95
7.4.180.0160.22916.95
7.4.160.0030.23816.95
7.4.150.0100.22916.95
7.4.140.0030.23716.95
7.4.130.0100.22916.95
7.4.120.0170.22216.95
7.4.110.0070.23216.95
7.4.100.0100.23116.95
7.4.90.0130.22616.95
7.4.80.0070.23216.95
7.4.70.0130.22616.95
7.4.60.0100.23016.95
7.4.50.0160.22516.95
7.4.40.0100.22916.95
7.4.30.0160.22316.95
7.4.20.0160.22416.95
7.4.10.0130.22716.95
7.4.00.0030.23616.95
7.3.330.0130.22716.95
7.3.320.0130.22616.95
7.3.310.0070.23516.95
7.3.300.0100.23016.95
7.3.290.0100.23116.95
7.3.280.0070.23116.95
7.3.270.0030.23516.95
7.3.260.0100.22816.95
7.3.250.0130.22816.95
7.3.240.0130.22616.95
7.3.230.0100.22916.95
7.3.220.0070.23716.95
7.3.210.0090.23416.95
7.3.200.0170.22316.95
7.3.190.0130.22716.95
7.3.180.0000.24316.95
7.3.170.0100.22916.95
7.3.160.0070.23216.95
7.3.150.0200.22016.95
7.3.140.0130.22916.95
7.3.130.0070.23216.95
7.3.120.0100.22916.95
7.3.110.0250.21516.95
7.3.100.0070.23416.95
7.3.90.0130.22516.95
7.3.80.0200.22016.95
7.3.70.0100.22916.95
7.3.60.0130.22516.95
7.3.50.0100.23116.95
7.3.40.0070.23316.95
7.3.30.0130.22616.95
7.3.20.0160.22318.06
7.3.10.0130.22918.05
7.3.00.0130.22617.89
7.2.340.0160.22316.95
7.2.330.0130.22716.95
7.2.320.0060.23516.95
7.2.310.0030.23516.95
7.2.300.0160.22316.95
7.2.290.0000.24016.95
7.2.280.0070.23516.95
7.2.270.0070.23416.95
7.2.260.0070.23216.95
7.2.250.0100.22916.95
7.2.240.0130.22916.95
7.2.230.0100.23016.95
7.2.220.0070.23216.95
7.2.210.0130.22516.95
7.2.200.0160.22516.95
7.2.190.0100.23016.95
7.2.180.0030.23616.95
7.2.170.0100.22916.95
7.2.160.0100.22816.95
7.2.150.0160.22418.19
7.2.140.0100.22818.05
7.2.130.0070.23218.38
7.2.120.0130.22718.27
7.2.110.0160.22418.31
7.2.100.0160.22318.25
7.2.90.0070.23218.16
7.2.80.0170.22618.10
7.2.70.0100.23118.16
7.2.60.0070.24217.57
7.2.50.0070.23218.32
7.2.40.0070.23318.29
7.2.30.0070.23318.31
7.2.20.0070.23118.38
7.2.10.0100.22918.38
7.2.00.0160.22618.20
7.1.330.0100.22917.07
7.1.320.0030.23517.29
7.1.310.0070.23117.14
7.1.300.0100.22817.16
7.1.290.0070.23417.28
7.1.280.0100.22817.19
7.1.270.0000.23817.15
7.1.260.0100.22817.09
7.1.250.0130.22517.02
7.1.240.0000.23817.15
7.1.230.0130.22517.28
7.1.220.0130.22417.11
7.1.210.0130.22517.07
7.1.200.0070.24016.37
7.1.190.0030.23417.15
7.1.180.0070.23517.04
7.1.170.0160.22117.15
7.1.160.0130.22817.11
7.1.150.0100.22817.14
7.1.140.0100.22916.98
7.1.130.0100.22817.02
7.1.120.0070.23217.06
7.1.110.0130.22617.04
7.1.100.0100.24317.56
7.1.90.0070.23217.18
7.1.80.0130.22517.29
7.1.70.0420.25616.94
7.1.60.0030.24118.45
7.1.50.0070.24217.09
7.1.40.0130.22617.10
7.1.30.0130.22617.24
7.1.20.0070.23117.11
7.1.10.0070.23217.04
7.1.00.0080.28819.78
7.0.330.0130.22416.95
7.0.320.0070.23116.95
7.0.310.0160.22016.95
7.0.300.0130.22516.95
7.0.290.0100.22816.95
7.0.280.0030.23516.95
7.0.270.0030.23416.95
7.0.260.0100.22716.95
7.0.250.0100.22916.95
7.0.240.0070.23016.95
7.0.230.0100.22716.95
7.0.220.0100.22716.95
7.0.210.0130.22517.00
7.0.200.0320.23815.81
7.0.190.0030.23416.95
7.0.180.0100.22817.00
7.0.170.0070.23116.97
7.0.160.0030.23416.95
7.0.150.0160.22116.95
7.0.140.0070.23216.95
7.0.130.0070.23116.95
7.0.120.0070.23116.95
7.0.110.0030.23416.95
7.0.100.0070.23216.96
7.0.90.0080.33518.47
7.0.80.0130.31518.45
7.0.70.0290.30118.43
7.0.60.0100.31218.45
7.0.50.0130.31318.65
7.0.40.0200.31518.67
7.0.30.0130.32518.64
7.0.20.0150.32518.64
7.0.10.0160.34718.65
7.0.00.0100.32418.67
5.6.400.0030.23416.95
5.6.390.0100.23016.95
5.6.380.0070.23116.95
5.6.370.0100.22816.95
5.6.360.0130.22516.95
5.6.350.0070.23216.95
5.6.340.0030.23316.95
5.6.330.0030.23416.95
5.6.320.0070.23116.95
5.6.310.0030.23416.95
5.6.300.0190.21816.95
5.6.290.0030.23316.95
5.6.280.0100.22716.95
5.6.270.0070.23216.95
5.6.260.0030.23416.95
5.6.250.0130.22316.95
5.6.240.0130.31518.78
5.6.230.0070.31718.77
5.6.220.0100.32118.73
5.6.210.0080.32418.77
5.6.200.0150.32819.07
5.6.190.0100.31819.06
5.6.180.0100.31419.02
5.6.170.0170.32019.02
5.6.160.0080.32919.02
5.6.150.0070.31919.03
5.6.140.0060.32019.02
5.6.130.0080.31719.02
5.6.120.0050.32119.05
5.6.110.0070.32119.02
5.6.100.0100.32219.02
5.6.90.0080.31918.98
5.6.80.0150.32818.71
5.6.70.0110.31718.71
5.6.60.0150.32018.71
5.6.50.0150.32818.72
5.6.40.0120.32018.71
5.6.30.0120.31818.71
5.6.20.0130.32518.66
5.6.10.0150.31518.70
5.6.00.0170.30818.66

preferences:
27.38 ms | 403 KiB | 5 Q