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); echo $hash; $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.2.60.0070.12617.02
7.2.00.0030.13419.46
7.1.200.0070.13215.77
7.1.100.0030.13818.27
7.1.70.0030.18717.13
7.1.60.0030.14919.24
7.1.50.0270.17734.56
7.1.00.0070.23722.30
7.0.200.0160.12116.72
7.0.140.0030.22321.93
7.0.60.0130.21019.87
7.0.50.0030.18317.89
7.0.40.0070.19320.30
7.0.30.0200.22020.16
7.0.20.0270.17720.06
7.0.10.0230.20320.23
7.0.00.0030.18320.38
5.6.280.0070.23320.91
5.6.210.0000.19720.47
5.6.200.0100.21318.29
5.6.190.0030.19720.53
5.6.180.4170.16320.45
5.6.170.0400.20720.47
5.6.160.0100.22020.50
5.6.150.0030.16718.23
5.6.140.0070.18318.28
5.6.130.0130.22318.19
5.6.120.0100.22321.12
5.6.110.0030.21321.14
5.6.100.0070.16721.09
5.6.90.0100.15320.88
5.6.80.0100.15020.38
5.6.70.3800.16320.54
5.5.350.0100.22020.43
5.5.340.0200.21718.08
5.5.330.0030.16020.19
5.5.320.0130.16320.34
5.5.310.0270.17020.30
5.5.300.0030.22318.08
5.5.290.0070.22718.09
5.5.280.0070.22020.84
5.5.270.0070.17020.87
5.5.260.0130.17720.85
5.5.250.0070.17720.56
5.5.240.0030.21720.19
5.4.450.0400.03719.32
5.4.440.0470.07019.39
5.4.430.0370.04019.49
5.4.420.0400.04719.46
5.4.410.0070.05719.06
5.4.400.0170.04718.76
5.4.390.0100.05318.59
5.4.380.0100.05718.79
5.4.370.0170.05018.84
5.4.360.0100.05318.74
5.4.350.0230.04318.79
5.4.340.0070.05718.63
5.4.320.0070.03712.50
5.4.310.0080.04012.50
5.4.300.0060.03912.51
5.4.290.0060.04112.50
5.4.280.0110.04712.38
5.4.270.0110.04712.38
5.4.260.0110.05612.38
5.4.250.0070.03912.37
5.4.240.0100.06012.37
5.4.230.0080.04112.36
5.4.220.0070.03912.36
5.4.210.0160.06312.36
5.4.200.0050.07212.36
5.4.190.0100.07712.36
5.4.180.0070.04212.36
5.4.170.0060.03812.37
5.4.160.0010.04212.37
5.4.150.0060.04212.36
5.4.140.0060.03912.04
5.4.130.0090.03612.03
5.4.120.0070.04211.99
5.4.110.0050.05111.99
5.4.100.0110.05911.98
5.4.90.0160.08511.98
5.4.80.0070.08511.98
5.4.70.0090.05111.98
5.4.60.0060.05711.98
5.4.50.0100.05111.98
5.4.40.0140.04911.97
5.4.30.0160.05411.96
5.4.20.0050.05011.96
5.4.10.0080.03611.97
5.4.00.0060.04011.45
5.3.290.0070.04312.80
5.3.280.0060.04312.71
5.3.270.0070.04312.73
5.3.260.0080.04012.72
5.3.250.0070.03912.72
5.3.240.0100.04712.72
5.3.230.0090.05312.71
5.3.220.0060.05712.68
5.3.210.0100.04112.68
5.3.200.0050.04512.68
5.3.190.0090.05712.67
5.3.180.0110.04712.67
5.3.170.0100.04012.67
5.3.160.0090.04112.67
5.3.150.0100.04912.67
5.3.140.0140.03612.66
5.3.130.0060.04412.66
5.3.120.0040.04612.66
5.3.110.0090.04712.66
5.3.100.0090.04312.12
5.3.90.0080.05712.09
5.3.80.0110.06612.08
5.3.70.0240.08012.08
5.3.60.0110.05312.06
5.3.50.0070.05012.00
5.3.40.0100.05912.00
5.3.30.0130.06211.95
5.3.20.0070.05611.74
5.3.10.0090.04911.70
5.3.00.0160.05211.70
5.2.170.0070.0439.19
5.2.160.0120.0389.18
5.2.150.0070.0449.18
5.2.140.0100.0439.18
5.2.130.0060.0429.14
5.2.120.0080.0459.14
5.2.110.0080.0469.15
5.2.100.0070.0429.14
5.2.90.0040.0419.14
5.2.80.0050.0419.14
5.2.70.0070.0409.14
5.2.60.0070.0509.09
5.2.50.0090.0509.07
5.2.40.0040.0339.04
5.2.30.0050.0329.02
5.2.20.0030.0339.00
5.2.10.0090.0318.92
5.2.00.0080.0368.78
5.1.60.0090.0418.07
5.1.50.0130.0498.07
5.1.40.0070.0468.04
5.1.30.0070.0358.39
5.1.20.0220.0638.41
5.1.10.0100.0478.14
5.1.00.0170.0598.14
5.0.50.0070.0196.61
5.0.40.0050.0246.48
5.0.30.0140.0606.29
5.0.20.0080.0256.26
5.0.10.0070.0326.24
5.0.00.0050.0646.23
4.4.90.0080.0424.78
4.4.80.0020.0234.75
4.4.70.0050.0254.76
4.4.60.0040.0214.76
4.4.50.0110.0424.77
4.4.40.0040.0734.71
4.4.30.0080.0164.75
4.4.20.0060.0234.84
4.4.10.0050.0244.85
4.4.00.0040.0324.76
4.3.110.0040.0214.67
4.3.100.0030.0184.66
4.3.90.0050.0134.63
4.3.80.0010.0334.58
4.3.70.0030.0194.63
4.3.60.0030.0204.63
4.3.50.0050.0204.63
4.3.40.0050.0294.53
4.3.30.0010.0183.29
4.3.20.0020.0163.27
4.3.10.0050.0153.23
4.3.00.0170.01713.29

preferences:
35.01 ms | 400 KiB | 5 Q