3v4l.org

run code in 300+ PHP versions simultaneously
<?php function password_verify_with_rehash($password, $hash) { if (!password_verify($password, $hash)) { return false; } if (password_needs_rehash($hash, PASSWORD_DEFAULT)) { $hash = password_hash($password, PASSWORD_DEFAULT); return $hash; } } $password = 'thisIsABadPassword'; $hash = password_hash($password, PASSWORD_BCRYPT, array("cost" => 10)); var_dump(password_verify_with_rehash($password, $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.0050.13116.44
7.3.00.0050.13116.64
7.2.130.0030.13616.66
7.2.120.0050.13416.80
7.2.110.0010.13716.67
7.2.100.0030.13116.84
7.2.90.0030.13716.67
7.2.80.0030.13216.88
7.2.70.0050.13116.78
7.2.60.0030.13116.83
7.2.50.0070.13016.74
7.2.40.0030.13116.62
7.2.30.0030.13416.75
7.2.20.0030.13216.94
7.2.10.0050.13116.90
7.2.00.0070.12817.60
7.1.250.0060.12915.52
7.1.200.0000.13715.72
7.1.100.0000.14017.97
7.1.70.0030.12816.98
7.1.60.0070.12919.21
7.1.50.0130.17616.92
7.1.00.0000.14322.44
7.0.200.0920.12814.57
7.0.140.0100.21722.19
7.0.60.0100.15319.84
7.0.50.0100.17018.05
7.0.40.0100.16020.13
7.0.30.0070.19720.26
7.0.20.0330.20020.07
7.0.10.0070.21320.27
7.0.00.0070.18020.23
5.6.280.0000.23721.13
5.6.210.0070.22320.70
5.6.200.0070.19018.16
5.6.190.0170.21020.50
5.6.180.0270.21320.67
5.6.170.0330.21020.54
5.6.160.0030.16020.59
5.6.150.0130.21718.23
5.6.140.0100.21318.15
5.6.130.0030.16318.25
5.6.120.0030.17021.03
5.6.110.0130.23021.00
5.6.100.0130.21321.03
5.6.90.0230.21021.14
5.6.80.0070.23320.49
5.5.350.4200.14320.32
5.5.340.0130.20718.04
5.5.330.0130.19720.28
5.5.320.0330.20720.27
5.5.310.0200.16020.28
5.5.300.0030.18017.95
5.5.290.0130.20717.98
5.5.280.0070.19720.86
5.5.270.0000.17320.97
5.5.260.0000.16320.75
5.5.250.0100.20320.75
5.5.240.0170.21020.34
5.4.450.3270.03719.55
5.4.440.3270.04019.48
5.4.430.3270.03319.46
5.4.420.3300.04719.48
5.4.410.3330.03019.37
5.4.400.3270.03019.17
5.4.390.3200.04719.32
5.4.380.3300.03319.21
5.4.370.3230.04018.98
5.4.360.3270.03319.22
5.4.350.3070.04319.06
5.4.340.2870.03319.21
5.4.320.3330.04019.09
5.4.310.3170.04318.85
5.4.300.3400.04018.98
5.4.290.3430.03019.16
5.4.280.3970.02319.16
5.4.270.3600.03319.24
5.4.260.3530.03718.86
5.4.250.3900.03718.86
5.4.240.3930.03718.94
5.4.230.3800.03019.24
5.4.220.3530.03719.21
5.4.210.3670.04318.98
5.4.200.3870.03319.05
5.4.190.3530.03719.05
5.4.180.3230.03718.86
5.4.170.3630.04019.20
5.4.160.2870.04719.21
5.4.150.3030.03319.24
5.4.140.2930.04316.66
5.4.130.3200.04016.30
5.4.120.3800.03016.66
5.4.110.3230.05316.56
5.4.100.3370.03716.54
5.4.90.3270.03716.61
5.4.80.3370.03016.44
5.4.70.3000.03716.35
5.4.60.3230.03716.43
5.4.50.3200.03016.42
5.4.40.3030.03316.48
5.4.30.3100.04016.50
5.4.20.3000.03016.55
5.4.10.3200.03716.42
5.4.00.3200.03315.86
5.3.290.3370.04014.57
5.3.280.3400.03714.59
5.3.270.3270.04014.58
5.3.260.3330.04014.58
5.3.250.3230.03314.62
5.3.240.3400.03314.76
5.3.230.3030.02714.60
5.3.220.3300.04314.68
5.3.210.3170.04314.55
5.3.200.3330.04014.62
5.3.190.3070.03314.73
5.3.180.3430.03014.55
5.3.170.3230.04014.54
5.3.160.3170.04314.49
5.3.150.3170.03014.48
5.3.140.2900.04314.46
5.3.130.3300.04314.59
5.3.120.3130.03714.59
5.3.110.3200.03314.46
5.3.100.3200.04314.33
5.3.90.3100.04014.33
5.3.80.3270.03714.33
5.3.70.2970.04014.33
5.3.60.3100.03714.33
5.3.50.3070.03314.33
5.3.40.3300.03314.33
5.3.30.3130.04014.33
5.3.20.3370.03714.33
5.3.10.3100.03714.33
5.3.00.3200.03714.33
5.2.170.2500.03014.33
5.2.160.2470.02714.33
5.2.150.2570.03314.33
5.2.140.2770.02714.33
5.2.130.2700.03014.33
5.2.120.2830.03014.33
5.2.110.2670.03014.33
5.2.100.2630.02314.33
5.2.90.2570.02314.33
5.2.80.2770.02714.33
5.2.70.2470.02714.33
5.2.60.2830.01714.33
5.2.50.2770.02714.33
5.2.40.2200.03014.33
5.2.30.2000.03314.33
5.2.20.2070.02714.33
5.2.10.2030.02714.33
5.2.00.2030.03014.33
5.1.60.2070.02714.33
5.1.50.1970.02714.33
5.1.40.1800.02314.33
5.1.30.2000.02714.33
5.1.20.2030.02314.33
5.1.10.2070.02014.33
5.1.00.2330.03014.33
5.0.50.0900.02014.33
5.0.40.1330.01314.33
5.0.30.1070.03014.33
5.0.20.1100.01714.33
5.0.10.1000.02014.33
5.0.00.1300.03014.33
4.4.90.1070.01714.33
4.4.80.0800.01314.33
4.4.70.1030.01714.33
4.4.60.1030.02014.33
4.4.50.0970.01714.33
4.4.40.1000.02314.33
4.4.30.0730.01714.33
4.4.20.0970.01714.33
4.4.10.0770.01314.33
4.4.00.1130.03014.33
4.3.110.0730.01714.33
4.3.100.1000.01714.33
4.3.90.1030.01014.33
4.3.80.1000.02314.33
4.3.70.1030.01714.33
4.3.60.1030.01314.33
4.3.50.1070.01014.33
4.3.40.1000.02314.33
4.3.30.0530.01714.33
4.3.20.0530.01014.33
4.3.10.0600.01314.33
4.3.00.0500.01314.33

preferences:
43.82 ms | 401 KiB | 5 Q