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'; } } $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)
5.5.00.0030.07020.04
5.4.160.0070.06719.18
5.4.150.0070.07319.13
5.4.140.0030.07316.33
5.4.130.0030.07716.14
5.4.120.0030.07316.41
5.4.110.0070.07316.41
5.4.100.0000.08716.34
5.4.90.0130.06316.60
5.4.80.0030.07016.32
5.4.70.0070.06316.41
5.4.60.0030.07016.33
5.4.50.0030.04016.36
5.4.40.0030.06716.39
5.4.30.0030.07316.36
5.4.20.0070.06316.34
5.4.10.0030.07716.39
5.4.00.0030.07015.59
5.3.260.0070.06014.71
5.3.250.0030.07314.67
5.3.240.0000.07014.69
5.3.230.0200.06314.61
5.3.220.0170.06014.43
5.3.210.0030.08014.62
5.3.200.0030.07014.55
5.3.190.0030.07314.68
5.3.180.0000.06714.67
5.3.170.0030.07714.52
5.3.160.0030.06314.66
5.3.150.0000.06314.62
5.3.140.0030.07014.43
5.3.130.0000.07714.62
5.3.120.0000.08314.60
5.3.110.0030.06314.64
5.3.100.0030.06314.10
5.3.90.0030.05013.93
5.3.80.0030.07714.07
5.3.70.0030.07714.00
5.3.60.0000.08014.00
5.3.50.0000.05713.84
5.3.40.0070.07313.96
5.3.30.0000.06013.87
5.3.20.0000.03713.68
5.3.10.0030.03313.74
5.3.00.0000.03713.59

preferences:
145.58 ms | 939 KiB | 8 Q