3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = new \Random\Randomizer(); $chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; $lens = [10, 100, 1000, 1024 * 1024, 1024 * 1024 * 10]; // bcrypt foreach ($lens as $len) { $pw = $r->getBytesFromString($chars, $len); $time = microtime(true); password_hash($pw, PASSWORD_DEFAULT); echo microtime(true) - $time . ' ms (bcrypt ' . strlen($pw) . " chars)\n"; } // PBKDF2 foreach ($lens as $len) { $pw = $r->getBytesFromString($chars, $len); $time = microtime(true); hash_pbkdf2('sha256', $pw, 'salt', 100000); echo microtime(true) - $time . ' ms (PBKDF2 ' . strlen($pw) . " chars)\n"; } // SHA-1 $time = microtime(true); foreach ($lens as $len) { $pw = $r->getBytesFromString($chars, $len); $time = microtime(true); sha1($pw); echo microtime(true) - $time . ' ms (SHA-1 ' . strlen($pw) . " chars)\n"; }

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.3.81.2180.77927.58
8.3.71.1540.84827.41
8.3.61.1320.86927.79
8.3.51.1230.88228.49
8.3.41.0840.90929.24
8.3.31.0950.90628.46
8.3.21.0710.92528.90
8.3.11.1300.86728.83
8.3.01.0890.90629.17
8.2.200.0110.00018.36
8.2.190.0160.00517.53
8.2.180.0160.00516.75
8.2.170.0220.00418.56
8.2.160.0200.00517.62
8.2.150.0220.00417.54
8.2.140.0190.00818.18
8.2.130.0220.00417.43
8.2.120.0220.00817.31
8.2.110.0230.00617.55
8.2.100.0230.00317.50
8.2.90.0200.00617.42
8.2.80.0200.00518.40
8.2.70.0210.00318.32
8.2.60.0190.00517.38
8.2.50.0200.00417.43
8.2.40.0160.00617.61
8.2.30.0180.00517.31
8.2.20.0230.00317.44
8.2.10.0160.00717.38
8.2.00.0190.00417.44
8.1.290.0220.00616.25
8.1.280.0180.00816.31
8.1.270.0240.00316.93
8.1.260.0240.00317.24
8.1.250.0180.00817.06
8.1.240.0170.00617.25
8.1.230.0160.00717.11
8.1.220.0200.00317.06
8.1.210.0220.00217.05
8.1.200.0180.00717.06
8.1.190.0180.00617.00
8.1.180.0180.00617.71
8.1.170.0150.00617.00
8.1.160.0200.00417.11
8.1.150.0180.00417.06
8.1.140.0140.00716.97
8.1.130.0190.00517.00
8.1.120.0180.00717.19
8.1.110.0210.00216.99
8.1.100.0180.00517.06
8.1.90.0200.00217.05
8.1.80.0180.00516.98
8.1.70.0200.00416.98
8.1.60.0220.00217.23
8.1.50.0180.00717.30
8.1.40.0220.00317.29
8.1.30.0250.00217.19
8.1.20.0200.00717.41
8.1.10.0240.00217.24
8.1.00.0230.00217.91

preferences:
67.75 ms | 403 KiB | 5 Q