3v4l.org

run code in 300+ PHP versions simultaneously
<?php function password_verify_with_rehash($password, $hash) { if (!password_verify($password, $hash)) { return 'badpass'; } if (password_needs_rehash($hash, PASSWORD_DEFAULT)) { $hash = password_hash($password, PASSWORD_DEFAULT); return 'rehash'; } return 'allgood'; } $password = 'thisIsABadPassword'; $hash = password_hash($password, PASSWORD_DEFAULT); $passwordTry = 'thisIsABadPasswordAndWrong'; var_dump(password_verify_with_rehash($passwordTry, $hash));

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.3.10.0070.12716.24
7.3.00.0130.12316.54
7.2.130.0100.13016.61
7.2.120.0130.12716.80
7.2.110.0070.13016.82
7.2.100.0160.12416.80
7.2.90.0030.13616.84
7.2.80.0130.12316.98
7.2.70.0070.13016.72
7.2.60.0080.12716.72
7.2.50.0030.13016.99
7.2.40.0100.12716.86
7.2.30.0030.13316.70
7.2.20.0070.12916.94
7.2.10.0030.12816.85
7.2.00.0070.13017.04
7.1.250.0070.12915.68
7.1.240.0130.11815.94
7.1.230.0070.13115.84
7.1.220.0100.12515.54
7.1.210.0100.12915.85
7.1.200.0070.12915.59
7.1.190.0100.12915.91
7.1.180.0130.12315.40
7.1.170.0130.12215.73
7.1.160.0030.12815.85
7.1.150.0070.13015.39
7.1.140.0070.13015.79
7.1.130.0100.13215.78
7.1.120.0130.12515.61
7.1.110.0030.13015.84
7.1.100.0030.13015.63
7.1.90.0000.13515.43
7.1.80.0160.11915.57
7.1.70.0070.13016.58
7.1.60.0050.15917.51
7.1.50.0050.12916.03
7.1.40.0070.12815.63
7.1.30.0070.13215.55
7.1.20.0000.14415.58
7.1.10.0030.13315.76
7.1.00.0070.18219.00
7.0.330.0070.12515.39
7.0.320.0070.13115.34
7.0.310.0030.13315.50
7.0.300.0030.13015.25
7.0.290.0070.13015.02
7.0.280.0130.12615.27
7.0.270.0030.12515.27
7.0.260.0070.13015.32
7.0.250.0100.12815.52
7.0.240.0100.12615.48
7.0.230.0130.12415.44
7.0.220.0170.11915.20
7.0.210.0100.12615.15
7.0.200.0070.13515.98
7.0.190.0070.12715.23
7.0.180.0070.12915.32
7.0.170.0070.13015.36
7.0.160.0070.13915.33
7.0.150.0070.13015.13
7.0.140.0030.17618.63
7.0.130.0070.13215.35
7.0.120.0000.13515.26
7.0.110.0000.13315.34
7.0.100.0100.13115.32
7.0.90.0000.13215.52
7.0.80.0000.14315.02
7.0.70.0070.13315.23
7.0.60.0020.18117.66
7.0.50.0050.17116.62
7.0.40.0100.17516.73
7.0.30.0220.16616.74
7.0.20.0200.16616.85
7.0.10.0000.18216.69
7.0.00.0070.17216.83
5.6.380.0070.13214.28
5.6.370.0030.12714.63
5.6.360.0070.13114.19
5.6.350.0100.12613.84
5.6.340.0030.13114.30
5.6.330.0130.12213.95
5.6.320.0100.12514.18
5.6.310.0100.12213.98
5.6.300.0060.14114.22
5.6.290.0070.13314.33
5.6.280.0080.18117.61
5.6.270.0000.13814.39
5.6.260.0030.13414.03
5.6.250.0000.13314.00
5.6.240.0030.12814.27
5.6.230.0000.13414.10
5.6.220.0070.12714.25
5.6.210.0080.16517.54
5.6.200.0050.17616.19
5.6.190.0070.17017.49
5.6.180.0150.15817.33
5.6.170.0100.15917.33
5.6.160.0050.17717.28
5.6.150.0150.15316.27
5.6.140.0050.17416.23
5.6.130.0110.17016.06
5.6.120.0070.14817.57
5.6.110.0080.17117.59
5.6.100.0070.18317.63
5.6.90.0070.14717.64
5.6.80.0050.14417.24
5.6.70.0070.12814.05
5.6.60.0030.12514.39
5.6.50.0070.13114.36
5.6.40.0070.12914.34
5.6.30.0070.12714.23
5.6.20.0070.13114.32
5.6.10.0070.13114.15
5.6.00.0070.12613.95
5.5.380.0000.13311.13
5.5.370.0000.13010.74
5.5.360.0070.12610.70
5.5.350.1780.16115.60
5.5.340.0050.17614.44
5.5.330.0020.14615.67
5.5.320.0050.19515.71
5.5.310.0170.14315.47
5.5.300.0080.15614.32
5.5.290.0030.16514.46
5.5.280.0050.17415.86
5.5.270.0130.16616.08
5.5.260.0050.16615.90
5.5.250.0070.17515.81
5.5.240.0120.17615.67
5.5.230.0030.12511.00
5.5.220.0030.13010.98
5.5.210.0030.12911.04
5.5.200.0070.12710.54
5.5.190.0030.13210.70
5.5.180.0060.12710.63
5.5.170.0000.12810.81
5.5.160.0030.12811.03
5.5.150.0000.13010.78
5.5.140.0070.12610.90
5.5.130.0030.13010.71
5.5.120.0030.13210.82
5.5.110.0030.12610.84
5.5.100.0000.13310.88
5.5.90.0030.12811.07
5.5.80.0070.13110.63
5.5.70.0030.12910.79
5.5.60.0070.12710.64
5.5.50.0070.12210.75
5.5.40.0030.12611.10
5.5.30.0030.13111.14
5.5.20.0000.13910.75
5.5.10.0030.12910.72
5.5.00.0030.13010.96
5.4.450.0080.02215.22
5.4.440.0120.04215.28
5.4.430.0050.02915.11
5.4.420.0080.02815.27
5.4.410.0100.02315.16
5.4.400.0120.03615.04
5.4.390.0210.03414.95
5.4.380.0080.02914.89
5.4.370.0130.03814.87
5.4.360.0120.02114.88
5.4.350.0070.02514.98
5.4.340.0180.02714.92
5.4.330.0030.01010.54
5.4.320.0130.01714.99
5.4.310.0070.02415.01
5.4.300.0070.02214.74
5.4.290.0100.02214.89
5.4.280.0080.02414.93
5.4.270.0070.02414.60
5.4.260.0110.02614.80
5.4.250.0120.02515.07
5.4.240.0120.01814.86
5.4.230.0070.02414.89
5.4.220.0120.02315.05
5.4.210.0090.02314.84
5.4.200.0080.02714.88
5.4.190.0090.02015.00
5.4.180.0110.02115.03
5.4.170.0130.02115.04
5.4.160.0080.03314.91
5.4.150.0070.02414.85
5.4.140.0090.02113.60
5.4.130.0120.04013.73
5.4.120.0120.02113.55
5.4.110.0140.01913.59
5.4.100.0120.02313.45
5.4.90.0130.02713.64
5.4.80.0100.02313.58
5.4.70.0150.03813.55
5.4.60.0120.01913.31
5.4.50.0070.03813.57
5.4.40.0100.03113.57
5.4.30.0150.01713.65
5.4.20.0180.03213.70
5.4.10.0150.02413.58
5.4.00.0130.02513.44
5.3.290.0060.02412.61
5.3.280.0130.01812.41
5.3.270.0120.03912.44
5.3.260.0170.01812.46
5.3.250.0180.03212.51
5.3.240.0130.03712.40
5.3.230.0080.03812.43
5.3.220.0080.02312.46
5.3.210.0160.03712.49
5.3.200.0150.03612.42
5.3.190.0140.02012.38
5.3.180.0130.02512.43
5.3.170.0110.02612.63
5.3.160.0130.03112.66
5.3.150.0260.01512.40
5.3.140.0150.03712.51
5.3.130.0200.03512.50
5.3.120.0170.03512.61
5.3.110.0210.01812.49
5.3.100.0120.03812.18
5.3.90.0080.02712.23
5.3.80.0150.02212.23
5.3.70.0140.02112.22
5.3.60.0100.02112.16
5.3.50.0170.02012.12
5.3.40.0160.01712.17
5.3.30.0070.02912.11
5.3.20.0100.02312.16
5.3.10.0090.03312.02
5.3.00.0100.03311.85
5.2.170.0140.03010.69
5.2.160.0100.02810.62
5.2.150.0080.03410.73
5.2.140.0130.01710.65
5.2.130.0070.01910.58
5.2.120.0060.01810.67
5.2.110.0080.01810.59
5.2.100.0100.01810.62
5.2.90.0100.01610.69
5.2.80.0100.03310.73
5.2.70.0080.02110.74
5.2.60.0130.02710.57
5.2.50.0080.02410.62
5.2.40.0100.02010.53
5.2.30.0050.02510.56
5.2.20.0100.03210.51
5.2.10.0120.01810.47
5.2.00.0050.03210.40
5.1.60.0060.03110.02
5.1.50.0080.02810.11
5.1.40.0080.02310.06
5.1.30.0080.03010.33
5.1.20.0070.01810.20
5.1.10.0110.02510.11
5.1.00.0080.02910.15
5.0.50.0050.0139.35
5.0.40.0050.0129.34
5.0.30.0090.0279.18
5.0.20.0100.0189.15
5.0.10.0050.0139.12
5.0.00.0050.0189.10
4.4.90.0020.0229.03
4.4.80.0020.0109.03
4.4.70.0050.0189.03
4.4.60.0050.0129.03
4.4.50.0080.0159.03
4.4.40.0030.0289.03
4.4.30.0030.0169.03
4.4.20.0010.0139.03
4.4.10.0100.0139.03
4.4.00.0030.0179.03
4.3.110.0000.0159.03
4.3.100.0070.0089.03
4.3.90.0020.0129.03
4.3.80.0030.0149.03
4.3.70.0050.0189.03
4.3.60.0030.0209.03
4.3.50.0060.0079.03
4.3.40.0070.0109.03
4.3.30.0020.0129.03
4.3.20.0000.0139.03
4.3.10.0020.0109.03
4.3.00.0020.0109.03

preferences:
34.18 ms | 401 KiB | 5 Q