3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = [ 'cost' => 7, 'salt' => 'BCryptRequires22Chrcts', ]; $hash['hash'][] = password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options); //"$2y$07$BCryptRequires22Chrcte/VlQH0piJtjXl.0t1XkA8pw9dMXTpOq" $hash['hash'][] = password_hash("rasmuslerdorf", PASSWORD_DEFAULT); //"$2y$10$hHi0De9WN.HL6.Fz1ElvbOMIU5NA0tetwdJzNziKJvHFXFqOxsybi" $hash['info'][] = password_get_info($hash['hash'][0]); //array("algo" => 1 , "algoName" => "bcrypt" , "options" => array("cost" => 7 )) $hash['info'][] = password_get_info($hash['hash'][1]); //array("algo" => 1 , "algoName" => "bcrypt" , "options" => array("cost" => 10 )) $hash['rehash'][] = password_needs_rehash($hash['hash'][0],PASSWORD_BCRYPT,$options); //false $hash['rehash'][] = password_needs_rehash($hash['hash'][0],PASSWORD_DEFAULT); //true $hash['rehash'][] = password_needs_rehash($hash['hash'][1],PASSWORD_DEFAULT); //false $hash['pas_verify'][] = password_verify('rasmuslerdorf', $hash['hash'][0]); //true $hash['pas_verify'][] = password_verify('rasmuslerdorf', $hash['hash'][1]); //true $hash['pas_verify'][] = password_verify('rasmuslerdorff', $hash['hash'][0]); //false $hash['pas_verify'][] = password_verify('rasmuslerdorff', $hash['hash'][1]); //false

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.10.0100.22115.04
7.4.00.0100.22514.72
7.3.130.0130.21414.96
7.3.120.0030.23314.96
7.3.110.0070.22614.91
7.3.100.0030.21814.94
7.3.90.0030.23114.94
7.3.80.0130.22115.05
7.3.70.0000.22814.67
7.3.60.0100.21414.92
7.3.50.0070.21214.92
7.3.40.0070.21214.94
7.3.30.0070.21114.93
7.3.20.0070.21616.51
7.3.10.0030.20716.67
7.3.00.0100.20316.79
7.2.260.0070.22815.00
7.2.250.0100.22514.93
7.2.240.0070.22315.17
7.2.230.0070.21915.09
7.2.220.0030.22015.11
7.2.210.0030.22115.13
7.2.200.0100.21515.00
7.2.190.0030.21915.16
7.2.180.0030.20915.04
7.2.170.0000.22114.63
7.2.160.0070.20814.80
7.2.150.0030.21316.84
7.2.140.0070.20716.92
7.2.130.0100.21016.96
7.2.120.0000.21016.80
7.2.110.0030.21916.60
7.2.100.0070.20916.59
7.2.90.0070.21216.81
7.2.80.0100.20916.84
7.2.70.0030.20616.90
7.2.60.0080.20916.84
7.2.50.0000.22316.67
7.2.40.0070.21216.67
7.2.30.0000.21316.84
7.2.20.0030.21516.77
7.2.10.0070.21216.84
7.2.00.0050.21618.09
7.1.330.0070.21915.85
7.1.320.0070.22916.01
7.1.310.0000.20615.92
7.1.300.0000.22015.75
7.1.290.0030.21915.71
7.1.280.0030.21815.87
7.1.270.0000.21815.75
7.1.260.0030.21315.66
7.1.250.0070.22215.83
7.1.240.0000.21515.71
7.1.230.0070.20615.69
7.1.220.0070.21515.82
7.1.210.0000.21515.82
7.1.200.0080.21015.83
7.1.190.0030.21315.66
7.1.180.0000.22515.92
7.1.170.0070.21215.88
7.1.160.0030.21915.76
7.1.150.0070.20515.85
7.1.140.0030.21115.84
7.1.130.0030.21315.73
7.1.120.0070.20815.61
7.1.110.0000.20815.82
7.1.100.0050.21716.82
7.1.90.0030.21615.75
7.1.80.0000.21115.64
7.1.70.0030.22516.51
7.1.60.0080.25217.53
7.1.50.0050.25416.43
7.1.40.0070.21315.94
7.1.30.0000.22415.70
7.1.20.0030.21015.58
7.1.10.0000.20915.68
7.1.00.0070.25519.17
7.0.330.0070.22615.39
7.0.320.0070.21115.41
7.0.310.0070.20715.43
7.0.300.0030.21415.60
7.0.290.0070.20415.26
7.0.280.0000.20915.43
7.0.270.0070.20615.40
7.0.260.0030.20515.43
7.0.250.0070.21715.68
7.0.240.0030.22215.40
7.0.230.0030.21915.57
7.0.220.0070.21315.37
7.0.210.0070.20515.41
7.0.200.0130.21815.13
7.0.190.0100.20515.34
7.0.180.0030.20415.32
7.0.170.0100.21015.39
7.0.160.0070.21615.22
7.0.150.0030.21215.48
7.0.140.0070.25718.89
7.0.130.0030.20815.44
7.0.120.0020.25318.75
7.0.110.0030.20415.44
7.0.100.0000.22715.42
7.0.90.0000.21615.50
7.0.80.0030.21315.41
7.0.70.0000.21815.45
7.0.60.0080.24717.71
7.0.50.0080.25516.69
7.0.40.0050.26215.49
7.0.30.0100.25715.58
7.0.20.0070.25715.65
7.0.10.0080.25515.71
7.0.00.0080.26115.63
5.6.400.0000.22114.46
5.6.390.0030.20414.24
5.6.380.0000.21514.47
5.6.370.0070.20714.50
5.6.360.0070.21914.18
5.6.350.0030.21214.59
5.6.340.0070.20714.29
5.6.330.0030.22214.41
5.6.320.0070.21814.24
5.6.310.0030.22114.53
5.6.300.0030.21314.28
5.6.290.0030.20914.53
5.6.280.0030.26517.66
5.6.270.0070.21114.30
5.6.260.0030.21314.60
5.6.250.0070.22014.55
5.6.240.0030.21014.35
5.6.230.0000.22714.36
5.6.220.0030.21714.31
5.6.210.0050.22617.34
5.6.200.0100.25816.20
5.6.190.0070.26116.27
5.6.180.0050.26516.19
5.6.170.0070.23216.32
5.6.160.0080.22916.44
5.6.150.0030.22716.36
5.6.140.0080.23716.20
5.6.130.0080.25216.17
5.6.120.0050.23116.32
5.6.110.0080.25316.32
5.6.100.0070.26016.18
5.6.90.0020.26316.41
5.6.80.0080.22315.90
5.6.70.0020.23815.88
5.6.60.0030.25315.91
5.6.50.0050.24315.89
5.6.40.0070.25415.89
5.6.30.0030.23815.92
5.6.20.0020.24016.00
5.6.10.0100.25216.08
5.6.00.0080.22615.92
5.5.380.0000.20914.33
5.5.370.0070.21514.47
5.5.360.0000.21314.38
5.5.350.0050.26217.51
5.5.340.0100.22516.31
5.5.330.0100.25716.01
5.5.320.0080.26116.12
5.5.310.0050.25515.99
5.5.300.0120.23016.11
5.5.290.0050.25716.11
5.5.280.0120.24916.13
5.5.270.0030.25516.04
5.5.260.0070.23916.14
5.5.250.0070.25415.97
5.5.240.0100.22815.97
5.5.230.0100.22415.72
5.5.220.0030.22515.83
5.5.210.0030.25815.80
5.5.200.0030.25315.85
5.5.190.0070.26315.75
5.5.180.0020.26215.84
5.5.170.0030.20614.29
5.5.160.0050.22715.87
5.5.150.0050.26215.74
5.5.140.0070.26015.94
5.5.130.0030.23315.90
5.5.120.0050.24015.68
5.5.110.0070.26215.84
5.5.100.0050.22815.82
5.5.90.0020.26315.89
5.5.80.0080.24615.75
5.5.70.0050.26015.74
5.5.60.0100.25815.79
5.5.50.0050.26515.52
5.5.40.0030.23615.71
5.5.30.0080.25115.79
5.5.20.0100.25915.67
5.5.10.0070.25115.49
5.5.00.0020.26215.85
5.4.450.0030.03015.28
5.4.440.0050.04515.20
5.4.430.0060.04115.28
5.4.420.0030.04215.24
5.4.410.0020.03515.13
5.4.400.0040.01915.06
5.4.390.0020.04315.06
5.4.380.0020.02815.07
5.4.370.0050.04014.97
5.4.360.0020.02515.05
5.4.350.0070.04015.06
5.4.340.0030.04515.01
5.4.330.0030.00311.13
5.4.320.0030.02215.04
5.4.310.0100.03715.01
5.4.300.0080.03015.10
5.4.290.0070.03715.10
5.4.280.0030.02315.11
5.4.270.0030.04515.05
5.4.260.0080.03715.08
5.4.250.0070.02015.05
5.4.240.0110.03615.05
5.4.230.0060.03514.97
5.4.220.0030.03315.08
5.4.210.0070.02815.05
5.4.200.0100.03815.11
5.4.190.0050.04115.05
5.4.180.0070.04015.07
5.4.170.0080.03815.05
5.4.160.0080.03515.05
5.4.150.0070.03615.04
5.4.140.0080.03213.71
5.4.130.0030.04013.71
5.4.120.0090.03313.73
5.4.110.0030.02813.70
5.4.100.0020.02413.69
5.4.90.0100.03413.73
5.4.80.0020.03513.67
5.4.70.0030.03313.74
5.4.60.0040.02313.64
5.4.50.0050.03813.73
5.4.40.0070.03513.77
5.4.30.0070.03313.81
5.4.20.0090.03713.68
5.4.10.0030.02513.63
5.4.00.0050.03513.43
5.3.290.0070.03412.79
5.3.280.0000.03012.86
5.3.270.0070.04312.79
5.3.260.0040.02812.90
5.3.250.0050.03312.84
5.3.240.0030.02512.85
5.3.230.0110.03312.83
5.3.220.0030.03212.76
5.3.210.0030.02612.77
5.3.200.0020.02712.81
5.3.190.0010.02612.81
5.3.180.0020.04312.81
5.3.170.0030.02412.89
5.3.160.0030.04112.83
5.3.150.0090.03612.83
5.3.140.0120.03512.81
5.3.130.0030.02212.82
5.3.120.0080.03712.80
5.3.110.0030.04112.82
5.3.100.0090.04012.54
5.3.90.0050.01812.55
5.3.80.0020.03512.61
5.3.70.0060.02312.46
5.3.60.0070.03812.49
5.3.50.0030.04512.42
5.3.40.0090.02312.52
5.3.30.0070.03712.40
5.3.20.0030.04212.31
5.3.10.0070.03512.37
5.3.00.0020.04012.36
5.2.170.0030.06311.05
5.2.160.0070.06010.98
5.2.150.0200.02711.10
5.2.140.0070.06311.04
5.2.130.0000.05011.09
5.2.120.0100.06011.07
5.2.110.0070.04311.02
5.2.100.0070.03710.92
5.2.90.0000.06711.00
5.2.80.0100.04310.99
5.2.70.0030.03310.87
5.2.60.0030.05711.02
5.2.50.0030.04310.99
5.2.40.0130.05310.98
5.2.30.0070.04310.91
5.2.20.0030.03310.96
5.2.10.0030.05010.89
5.2.00.0000.03010.74
5.1.60.0070.0509.96
5.1.50.0070.03010.00
5.1.40.0000.0279.97
5.1.30.0100.02010.33
5.1.20.0000.04010.35
5.1.10.0130.04310.14
5.1.00.0030.02710.00
5.0.50.0030.0378.52
5.0.40.0000.0408.43
5.0.30.0070.0638.19
5.0.20.0030.0408.21
5.0.10.0100.0208.14
5.0.00.0000.0578.14
4.4.90.0030.0337.70
4.4.80.0000.0207.70
4.4.70.0000.0177.70
4.4.60.0000.0207.70
4.4.50.0000.0207.70
4.4.40.0030.0437.70
4.4.30.0030.0207.70
4.4.20.0030.0337.70
4.4.10.0030.0177.70
4.4.00.0030.0507.70
4.3.110.0000.0237.70
4.3.100.0030.0377.70
4.3.90.0000.0237.70
4.3.80.0000.0437.70
4.3.70.0100.0137.70
4.3.60.0000.0377.70
4.3.50.0000.0407.70
4.3.40.0070.0407.70
4.3.30.0030.0337.70
4.3.20.0000.0237.70
4.3.10.0000.0277.70
4.3.00.0030.0137.70

preferences:
31.51 ms | 401 KiB | 5 Q