3v4l.org

run code in 300+ PHP versions simultaneously
<?php $password = bin2hex(random_bytes(128)); $hashed = hash('sha256', $password, true); // Raw binary $salt = random_bytes(32); // Pwhash: $pwhash = hash_pbkdf2('sha256', $password, $salt, 1000, 64); // Now the attack $attack = hash_pbkdf2('sha256', $hashed, $salt, 1000, 64); var_dump([ 'password-hash' => $pwhash, 'attack-output' => $attack ]);

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)
8.1.120.0130.00918.67
8.1.110.0160.00518.62
8.1.100.0130.00818.77
8.1.90.0060.01618.59
8.1.80.0170.00718.63
8.1.70.0180.00418.63
8.1.60.0100.01518.80
8.1.50.0110.01118.78
8.1.40.0160.00919.02
8.1.30.0140.01119.04
8.1.20.0200.00618.22
8.1.10.0120.01318.12
8.1.00.0130.01018.02
8.0.250.0080.00418.08
8.0.240.0090.00918.05
8.0.230.0130.00418.10
8.0.220.0070.01017.93
8.0.210.0110.00618.01
8.0.200.0090.00917.98
8.0.190.0120.00517.99
8.0.180.0130.00418.08
8.0.170.0130.00717.41
8.0.160.0130.00617.43
8.0.150.0170.00517.28
8.0.140.0090.01217.41
8.0.130.0140.00617.41
8.0.120.0180.00417.38
8.0.110.0110.01017.31
8.0.100.0030.01817.42
8.0.90.0120.00817.45
8.0.80.0140.00717.40
8.0.70.0160.01017.16
8.0.60.0130.00817.42
8.0.50.0140.00617.32
8.0.30.0140.00617.41
8.0.20.0060.01317.43
8.0.10.0100.01217.42
8.0.00.0120.01216.90
7.4.330.0120.00815.55
7.4.320.0140.00717.62
7.4.300.0170.00217.68
7.4.290.0150.00317.63
7.4.280.0090.00517.05
7.4.270.0150.00716.99
7.4.260.0110.01117.08
7.4.250.0090.01317.08
7.4.240.0140.00716.93
7.4.230.0140.00817.08
7.4.220.0140.00817.11
7.4.210.0100.01017.07
7.4.200.0100.00917.00
7.4.190.0080.01117.15
7.4.180.0110.00617.09
7.4.160.0130.00617.16
7.4.150.0060.00916.98
7.4.140.0040.01316.84
7.4.130.0120.01416.68
7.4.120.0130.01316.72
7.4.110.0120.01516.71
7.4.100.0110.01416.72
7.4.90.0130.01116.66
7.4.80.0110.01316.71
7.4.70.0100.01516.69
7.4.60.0120.01416.65
7.4.50.0110.01216.66
7.4.40.0100.01316.54
7.4.30.0160.01416.62
7.4.20.0110.01316.45
7.4.10.0120.01116.51
7.4.00.0100.01516.56
7.3.330.0080.01416.74
7.3.320.0100.00916.75
7.3.310.0130.00716.84
7.3.300.0100.01016.83
7.3.290.0140.00816.85
7.3.280.0100.01016.87
7.3.270.0160.00716.77
7.3.260.0110.01016.74
7.3.250.0130.01316.44
7.3.240.0120.01416.46
7.3.230.0130.01316.38
7.3.220.0100.01516.41
7.3.210.0120.01316.44
7.3.200.0120.01416.38
7.3.190.0130.01216.47
7.3.180.0120.01516.44
7.3.170.0140.01116.49
7.3.160.0120.01316.37
7.3.150.0130.01416.40
7.3.140.0110.01416.50
7.3.130.0150.01216.48
7.3.120.0120.01316.46
7.3.110.0120.01516.44
7.3.100.0110.01516.44
7.3.90.0090.01616.48
7.3.80.0120.01316.40
7.3.70.0130.01416.41
7.3.60.0110.01316.46
7.3.50.0090.01516.42
7.3.40.0130.01316.44
7.3.30.0130.01316.42
7.3.20.0130.01517.09
7.3.10.0190.01216.89
7.3.00.0140.01616.93
7.2.340.0170.01416.52
7.2.330.0170.01416.62
7.2.320.0170.01616.53
7.2.310.0180.01216.55
7.2.300.0170.01516.57
7.2.290.0130.01616.54
7.2.280.0180.01216.54
7.2.270.0150.01516.52
7.2.260.0170.01516.48
7.2.250.0160.01416.51
7.2.240.0170.01516.55
7.2.230.0160.01316.48
7.2.220.0150.01316.52
7.2.210.0170.01416.58
7.2.200.0150.01416.52
7.2.190.0150.01316.55
7.2.180.0170.01416.45
7.2.170.0180.01316.52
7.2.160.0170.01216.53
7.2.150.0190.01417.08
7.2.140.0200.01317.08
7.2.130.0170.01417.15
7.2.120.0190.01317.10
7.2.110.0310.01117.07
7.2.100.0160.01517.05
7.2.90.0200.01417.05
7.2.80.0190.01417.05
7.2.70.0220.01517.00
7.2.60.0170.01517.05
7.2.50.0190.01417.01
7.2.40.0360.01617.08
7.2.30.0200.01517.12
7.2.20.0170.01417.02
7.2.10.0200.01417.10
7.2.00.0180.01517.00

preferences:
41.43 ms | 403 KiB | 5 Q