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($hash); 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.4.00.0070.13615.01
7.3.120.0070.12714.58
7.3.110.0030.14114.72
7.3.100.0100.12614.96
7.3.90.0070.12314.69
7.3.80.0030.12614.55
7.3.70.0070.13014.78
7.3.60.0070.13114.90
7.3.50.0070.13214.97
7.3.40.0070.12914.70
7.3.30.0030.13714.84
7.3.20.0000.12916.64
7.3.10.0030.13116.39
7.3.00.0080.12816.45
7.2.250.0100.13715.12
7.2.240.0000.13914.91
7.2.230.0070.13715.02
7.2.220.0070.12715.18
7.2.210.0030.13415.02
7.2.200.0100.12115.14
7.2.190.0000.13314.95
7.2.180.0070.12415.16
7.2.170.0030.12415.11
7.2.130.0070.12416.85
7.2.120.0100.12716.66
7.2.110.0070.13616.76
7.2.100.0070.13616.69
7.2.90.0100.12916.73
7.2.80.0070.13316.55
7.2.70.0070.14016.68
7.2.60.0050.13416.74
7.2.50.0130.12316.79
7.2.40.0070.13216.85
7.2.30.0100.13116.88
7.2.20.0100.12716.88
7.2.10.0030.14516.79
7.2.00.0100.12818.03
7.1.330.0070.12815.77
7.1.320.0030.13315.68
7.1.310.0030.13115.86
7.1.300.0070.12715.71
7.1.290.0000.13315.65
7.1.280.0000.13415.75
7.1.270.0070.13015.70
7.1.260.0030.12615.57
7.1.250.0030.13615.58
7.1.240.0100.12415.60
7.1.230.0030.13315.75
7.1.220.0100.13615.67
7.1.210.0130.12115.67
7.1.200.0100.12515.68
7.1.190.0100.12615.70
7.1.180.0100.12715.76
7.1.170.0070.12815.66
7.1.160.0130.12915.75
7.1.150.0130.12515.81
7.1.140.0070.13715.72
7.1.130.0070.12715.38
7.1.120.0070.13015.61
7.1.110.0070.13415.58
7.1.100.0070.13216.90
7.1.90.0030.14015.74
7.1.80.0130.12515.75
7.1.70.0030.12916.50
7.1.60.0080.14817.54
7.1.50.0120.15416.13
7.1.40.0070.12815.55
7.1.30.0130.12915.66
7.1.20.0070.13215.76
7.1.10.0170.12315.68
7.1.00.0070.16919.17
7.0.330.0100.12715.15
7.0.320.0100.12715.34
7.0.310.0030.13415.38
7.0.300.0070.13015.33
7.0.290.0100.12715.56
7.0.280.0070.13215.35
7.0.270.0100.12115.48
7.0.260.0030.13215.36
7.0.250.0070.13215.21
7.0.240.0130.12815.31
7.0.230.0100.12215.31
7.0.220.0030.12515.43
7.0.210.0070.12915.05
7.0.200.0050.12616.06
7.0.190.0070.13415.34
7.0.180.0130.13115.51
7.0.170.0070.13015.38
7.0.160.0070.12615.41
7.0.150.0130.12215.08
7.0.140.0050.17418.67
7.0.130.0100.13615.19
7.0.120.0070.13015.34
7.0.110.0100.12815.32
7.0.100.0200.16917.58
7.0.90.0100.16417.59
7.0.80.0080.14917.64
7.0.70.0100.14517.54
7.0.60.0120.18117.53
7.0.50.0200.17617.85
7.0.40.0020.17816.83
7.0.30.0000.19216.77
7.0.20.0080.14616.75
7.0.10.0030.17716.72
7.0.00.0030.17716.65
5.6.380.0030.12614.09
5.6.370.0030.13214.03
5.6.360.0030.13014.11
5.6.350.0070.13114.42
5.6.340.0070.12614.36
5.6.330.0030.13214.16
5.6.320.0030.12913.81
5.6.310.0130.11714.43
5.6.300.0030.12913.81
5.6.290.0030.13214.33
5.6.280.0020.18517.46
5.6.270.0070.12613.87
5.6.260.0070.12914.47
5.6.250.0020.18217.27
5.6.240.0100.14717.40
5.6.230.0100.17217.48
5.6.220.0050.16717.31
5.6.210.0080.16617.30
5.6.200.0050.13917.61
5.6.190.0080.13917.56
5.6.180.0080.17817.53
5.6.170.0080.17417.52
5.6.160.0070.18417.57
5.6.150.0100.15717.46
5.6.140.0030.20917.71
5.6.130.0030.17117.57
5.6.120.0030.15317.62
5.6.110.0080.18817.49
5.6.100.0100.14717.62
5.6.90.0070.16117.53
5.6.80.0120.19417.28
5.6.70.0000.15717.22
5.6.60.0050.14617.08
5.6.50.0020.16317.22
5.6.40.0130.15117.18
5.6.30.0080.14517.21
5.6.20.0080.14117.08
5.6.10.0100.14117.21
5.6.00.0020.14917.24
5.5.380.0030.17415.64
5.5.370.0020.17515.79
5.5.360.0050.16715.68
5.5.350.0120.17915.66
5.5.340.0050.17415.85
5.5.330.0030.16015.97
5.5.320.0100.17215.90
5.5.310.0120.17115.95
5.5.300.0080.15516.02
5.5.290.0120.18316.15
5.5.280.0050.16515.97
5.5.270.0080.16915.98
5.5.260.0070.18215.75
5.5.250.0120.18115.79
5.5.240.0030.17415.72
5.5.230.0020.14615.42
5.5.220.0020.13915.45
5.5.210.0050.13115.52
5.5.200.0070.13215.46
5.5.190.0100.14215.48
5.5.180.0080.16615.51
5.5.170.0070.13110.99
5.5.160.0080.13115.63
5.5.150.0030.15015.57
5.5.140.0050.14515.56
5.5.130.0050.18015.49
5.5.120.0080.17215.55
5.5.110.0070.18715.53
5.5.100.0100.16515.67
5.5.90.0070.16915.32
5.5.80.0070.15315.38
5.5.70.0100.14915.39
5.5.60.0070.19115.47
5.5.50.0100.18715.49
5.5.40.0080.19415.45
5.5.30.0050.20015.63
5.5.20.0100.18315.59
5.5.10.0100.17815.53
5.5.00.0120.17515.58
5.4.450.0110.04115.28
5.4.440.0040.04415.21
5.4.430.0090.04314.99
5.4.420.0120.03714.94
5.4.410.0080.04815.13
5.4.400.0100.02714.91
5.4.390.0060.02214.90
5.4.380.0040.02214.76
5.4.370.0040.01814.81
5.4.360.0110.01614.92
5.4.350.0060.03414.96
5.4.340.0040.02315.03
5.4.330.0000.01110.89
5.4.320.0070.02015.07
5.4.310.0070.02314.96
5.4.300.0060.04214.99
5.4.290.0070.04314.99
5.4.280.0130.03715.02
5.4.270.0090.03315.10
5.4.260.0040.04514.99
5.4.250.0060.04214.83
5.4.240.0090.04214.83
5.4.230.0070.03815.02
5.4.220.0050.03815.04
5.4.210.0120.04014.74
5.4.200.0050.02515.04
5.4.190.0080.03815.12
5.4.180.0110.03615.00
5.4.170.0080.02915.12
5.4.160.0070.02314.90
5.4.150.0040.02914.82
5.4.140.0080.03513.51
5.4.130.0110.01913.53
5.4.120.0110.03113.72
5.4.110.0120.03813.54
5.4.100.0100.03513.76
5.4.90.0040.02713.59
5.4.80.0070.04013.62
5.4.70.0070.04013.64
5.4.60.0060.03813.56
5.4.50.0030.03813.48
5.4.40.0030.04213.57
5.4.30.0060.02513.67
5.4.20.0070.03913.73
5.4.10.0030.04313.66
5.4.00.0070.03513.22
5.3.290.0000.02212.51
5.3.280.0070.04012.43
5.3.270.0040.03012.56
5.3.260.0010.02612.54
5.3.250.0050.02312.48
5.3.240.0020.02812.49
5.3.230.0150.03312.44
5.3.220.0070.03912.48
5.3.210.0090.03212.53
5.3.200.0030.04312.50
5.3.190.0030.04012.49
5.3.180.0090.03312.61
5.3.170.0090.03912.58
5.3.160.0100.03612.57
5.3.150.0050.04412.54
5.3.140.0030.02812.58
5.3.130.0110.03812.55
5.3.120.0090.03712.59
5.3.110.0120.01812.52
5.3.100.0100.03612.30
5.3.90.0100.03512.14
5.3.80.0090.03612.24
5.3.70.0090.04012.11
5.3.60.0080.04212.19
5.3.50.0060.02512.05
5.3.40.0100.03812.23
5.3.30.0090.03712.10
5.3.20.0060.04212.09
5.3.10.0010.03511.97
5.3.00.0050.04012.02
5.2.170.0080.03010.38
5.2.160.0080.02610.31
5.2.150.0040.03510.28
5.2.140.0070.02710.35
5.2.130.0090.01610.32
5.2.120.0070.02510.20
5.2.110.0060.01510.22
5.2.100.0020.02110.30
5.2.90.0030.03510.21
5.2.80.0040.02110.27
5.2.70.0020.02310.32
5.2.60.0050.03210.18
5.2.50.0090.02810.21
5.2.40.0030.01910.29
5.2.30.0090.02610.21
5.2.20.0060.03110.21
5.2.10.0050.03510.11
5.2.00.0040.01910.13
5.1.60.0050.0309.74
5.1.50.0070.0229.62
5.1.40.0030.0169.73
5.1.30.0080.0139.84
5.1.20.0070.0139.89
5.1.10.0050.0149.68
5.1.00.0020.0189.77
5.0.50.0040.0139.03
5.0.40.0040.0178.94
5.0.30.0050.0238.82
5.0.20.0050.0188.84
5.0.10.0070.0208.72
5.0.00.0050.0318.78
4.4.90.0040.0098.67
4.4.80.0030.0188.67
4.4.70.0000.0178.67
4.4.60.0050.0118.67
4.4.50.0030.0198.67
4.4.40.0070.0198.67
4.4.30.0000.0138.67
4.4.20.0000.0138.67
4.4.10.0030.0158.67
4.4.00.0020.0278.67
4.3.110.0000.0198.67
4.3.100.0010.0138.67
4.3.90.0020.0178.67
4.3.80.0020.0328.67
4.3.70.0030.0158.67
4.3.60.0030.0108.67
4.3.50.0020.0198.67
4.3.40.0030.0208.67
4.3.30.0000.0158.67
4.3.20.0000.0218.67
4.3.10.0050.0148.67
4.3.00.0030.0138.67

preferences:
40.35 ms | 401 KiB | 5 Q