3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mcrypt_create_iv($len) { $str = ''; for ($i = 0; $i < $len; $i++) { $str .= chr(mt_rand(0, 255)); } return $str; } $options = [ 'cost' => 11, 'salt' => mcrypt_create_iv(16), ]; echo password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)."\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)
7.1.00.0070.06722.54
7.0.140.0030.07321.99
7.0.120.0000.03322.15
7.0.60.0070.08019.97
5.6.280.0100.06721.12
5.6.210.0130.08020.55
5.5.350.0430.06320.47
5.4.160.0100.06718.84
5.4.150.0100.04719.13
5.4.140.0000.06716.50
5.4.130.0100.06316.32
5.4.120.0100.05716.41
5.4.110.0070.07716.34
5.4.100.0070.07316.41
5.4.90.0030.03716.43
5.4.80.0070.04716.52
5.4.70.0070.05716.66
5.4.60.0070.04016.47
5.4.50.0100.04016.46
5.4.40.0070.05016.40
5.4.30.0030.04016.42
5.4.20.0130.06016.64
5.4.10.0070.06316.46
5.4.00.0170.06715.88
5.3.260.0100.05314.66
5.3.250.0100.07014.67
5.3.240.0100.06014.64
5.3.230.0030.04314.67
5.3.220.0070.05714.72
5.3.210.0100.06714.57
5.3.200.0070.05014.55
5.3.190.0070.06314.63
5.3.180.0170.06714.45
5.3.170.0070.07714.48
5.3.160.0100.04014.62
5.3.150.0030.07714.48
5.3.140.0130.06714.61
5.3.130.0070.06314.70
5.3.120.0000.04714.60
5.3.110.0000.04314.43
5.3.100.0030.06314.18
5.3.90.0070.06014.03
5.3.80.0030.04714.06
5.3.70.0030.07714.01
5.3.60.0000.05713.95
5.3.50.0030.04313.91
5.3.40.0070.07713.98
5.3.30.0100.04013.82
5.3.20.0100.06313.68
5.3.10.0070.07313.66
5.3.00.0100.06713.68
5.2.170.0070.05011.14
5.2.160.0030.06011.09
5.2.150.0070.05311.21
5.2.140.0130.02711.19
5.2.130.0070.06011.24
5.2.120.0000.04310.99
5.2.110.0030.03711.15
5.2.100.0100.06011.07
5.2.90.0100.04311.15
5.2.80.0030.04311.04
5.2.70.0100.05710.98
5.2.60.0070.05011.10
5.2.50.0200.04710.97
5.2.40.0070.03311.02
5.2.30.0070.05710.86
5.2.20.0000.04710.96
5.2.10.0070.04710.89
5.2.00.0030.05710.87
5.1.60.0070.03310.05
5.1.50.0030.05710.01
5.1.40.0030.05310.02
5.1.30.0030.04010.38
5.1.20.0030.03710.51
5.1.10.0100.04010.08
5.1.00.0070.04010.11
5.0.50.0000.0438.72
5.0.40.0000.0338.72
5.0.30.0000.0638.72
5.0.20.0030.0278.72
5.0.10.0000.0508.72
5.0.00.0070.0578.72
4.4.90.0000.0238.72
4.4.80.0000.0238.72
4.4.70.0030.0278.72
4.4.60.0130.0278.72
4.4.50.0070.0308.72
4.4.40.0030.0408.72
4.4.30.0100.0278.72
4.4.20.0030.0308.72
4.4.10.0000.0278.72
4.4.00.0030.0308.72
4.3.110.0000.0238.72
4.3.100.0070.0238.72
4.3.90.0030.0238.72
4.3.80.0030.0578.72
4.3.70.0070.0308.72
4.3.60.0030.0238.72
4.3.50.0030.0378.72
4.3.40.0000.0538.72
4.3.30.0000.0338.72
4.3.20.0030.0238.72
4.3.10.0000.0338.72
4.3.00.0000.0208.72

preferences:
32.12 ms | 401 KiB | 5 Q