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 var_export($hash, true);

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.00.0130.21514.86
7.3.120.0130.22114.88
7.3.110.0030.22714.90
7.3.100.0070.22114.62
7.3.90.0100.21614.64
7.3.80.0070.21714.90
7.3.70.0030.21014.81
7.3.60.0070.20814.94
7.3.50.0030.20914.68
7.3.40.0030.21014.89
7.3.30.0000.20914.55
7.3.20.0000.21616.61
7.3.10.0070.20416.65
7.3.00.0070.20216.57
7.2.250.0030.23015.09
7.2.240.0100.21514.91
7.2.230.0070.21114.94
7.2.220.0000.22215.06
7.2.210.0030.22415.12
7.2.200.0070.21915.15
7.2.190.0030.21415.05
7.2.180.0070.21914.86
7.2.170.0070.21715.04
7.2.80.0030.21116.66
7.2.60.0070.21216.75
7.1.330.0030.21715.72
7.1.320.0000.22315.92
7.1.310.0100.21416.06
7.1.300.0030.22215.88
7.1.290.0030.22115.94
7.1.280.0030.21815.86
7.1.270.0070.21215.95
7.1.260.0070.20615.77
7.1.200.0070.21015.74
7.1.70.0030.24017.18
7.1.60.0070.28719.33
7.1.50.0070.21816.99
7.1.00.0030.32022.57
7.0.200.0000.21716.87
7.0.140.0030.28722.15
7.0.100.0130.24020.05
7.0.90.0130.20319.91
7.0.80.0070.28019.88
7.0.70.0030.32319.96
7.0.60.0030.25319.95
7.0.50.0030.25020.42
7.0.40.0030.21719.95
7.0.30.0030.20720.13
7.0.20.0100.21020.18
7.0.10.0070.23720.10
7.0.00.0030.20720.16
5.6.280.0030.32020.89
5.6.250.0330.25320.75
5.6.240.0070.21020.50
5.6.230.0070.32320.68
5.6.220.0130.20720.52
5.6.210.0030.21720.60
5.6.200.0030.25021.08
5.6.190.0070.25720.97
5.6.180.0070.24321.18
5.6.170.0070.23721.02
5.6.160.0030.22721.06
5.6.150.0070.29320.98
5.6.140.0130.31021.08
5.6.130.0030.32721.04
5.6.120.0070.22021.06
5.6.110.0030.22721.04
5.6.100.0130.31321.03
5.6.90.0070.30721.16
5.6.80.0030.28720.56
5.6.70.0030.30320.40
5.6.60.0100.28720.44
5.6.50.0070.31320.42
5.6.40.0100.30720.43
5.6.30.0030.26020.52
5.6.20.0170.25720.50
5.6.10.0070.25020.41
5.6.00.0030.21720.42
5.5.380.0100.30320.45
5.5.370.0130.28020.46
5.5.360.0030.29720.43
5.5.350.0030.25020.48
5.5.340.0370.20020.77
5.5.330.0070.24720.82
5.5.320.0070.24720.97
5.5.310.0000.22320.81
5.5.300.0030.30020.88
5.5.290.0000.24320.97
5.5.280.0030.29320.92
5.5.270.0130.29720.88
5.5.260.0070.30720.91
5.5.250.0030.30720.69
5.5.240.0100.27020.20
5.5.230.0030.31020.34
5.5.220.0070.30020.14
5.5.210.0130.28020.25
5.5.200.0070.28320.21
5.5.190.0170.30020.23
5.5.180.0100.28320.19
5.5.160.0100.29020.24
5.5.150.0170.29020.14
5.5.140.0170.31020.23
5.5.130.0100.30020.19
5.5.120.0100.31020.26
5.5.110.0030.26720.14
5.5.100.0030.31720.09
5.5.90.0030.24719.93
5.5.80.0400.20020.20
5.5.70.0070.27720.07
5.5.60.0070.25720.12
5.5.50.0030.26020.11
5.5.40.0030.26020.08
5.5.30.0030.24720.05
5.5.20.0070.21020.09
5.5.10.0070.27720.01
5.5.00.0130.28020.09
5.4.450.0030.08319.44
5.4.440.0130.06719.30
5.4.430.0070.08319.13
5.4.420.0170.04319.55
5.4.410.0030.07719.14
5.4.400.0130.06319.15
5.4.390.0130.06718.80
5.4.380.0100.04718.96
5.4.370.0170.05019.04
5.4.360.0100.07018.92
5.4.350.0030.08319.05
5.4.340.0130.07318.85
5.4.320.0030.07719.12
5.4.310.0130.08018.81
5.4.300.0030.04018.80
5.4.290.0070.04018.78
5.4.280.0000.05019.07
5.4.270.0030.08018.99
5.4.260.0030.07019.04
5.4.250.0100.06719.09
5.4.240.0070.07319.05
5.4.230.0030.08019.07
5.4.220.0070.08019.04
5.4.210.0000.08318.93
5.4.200.0200.05719.02
5.4.190.0130.03318.93
5.4.180.0100.07318.93
5.4.170.0030.06019.08
5.4.160.0170.06319.07
5.4.150.0130.07318.77
5.4.140.0170.05716.37
5.4.130.0030.05316.28
5.4.120.0030.07316.25
5.4.110.0100.03016.33
5.4.100.0000.04316.41
5.4.90.0030.07716.45
5.4.80.0030.06316.22
5.4.70.0100.06016.22
5.4.60.0070.07316.29
5.4.50.0030.07016.20
5.4.40.0030.06016.45
5.4.30.0130.06016.23
5.4.20.0070.07016.19
5.4.10.0200.05716.38
5.4.00.0070.07015.77
5.3.290.0030.05714.63
5.3.280.0030.05014.51
5.3.270.0070.03314.57
5.3.260.0130.06714.57
5.3.250.0070.05314.46
5.3.240.0000.04014.59
5.3.230.0030.03714.51
5.3.220.0000.05714.56
5.3.210.0000.07314.41
5.3.200.0100.06314.40
5.3.190.0130.06714.42
5.3.180.0100.03714.56
5.3.170.0070.06314.55
5.3.160.0200.06314.47
5.3.150.0070.07014.52
5.3.140.0070.07314.41
5.3.130.0070.08014.53
5.3.120.0070.09014.50
5.3.110.0100.06714.41
5.3.100.0100.07013.98
5.3.90.0100.03713.98
5.3.80.0030.04314.00
5.3.70.0170.05713.87
5.3.60.0100.04013.98
5.3.50.0030.04713.89
5.3.40.0070.07013.92
5.3.30.0030.07713.86
5.3.20.0030.03713.60
5.3.10.0000.08013.61
5.3.00.0070.07313.56
5.2.170.0130.04312.11
5.2.160.0070.05712.11
5.2.150.0070.05712.11
5.2.140.0100.06012.11
5.2.130.0030.04712.11
5.2.120.0070.04712.11
5.2.110.0030.03012.11
5.2.100.0100.06012.11
5.2.90.0070.05012.11
5.2.80.0100.05012.11
5.2.70.0030.06312.11
5.2.60.0100.06012.11
5.2.50.0030.06312.11
5.2.40.0070.05712.11
5.2.30.0030.06712.11
5.2.20.0000.06012.11
5.2.10.0070.03012.11
5.2.00.0030.04712.11
5.1.60.0030.02712.11
5.1.50.0070.05012.11
5.1.40.0100.04712.11
5.1.30.0100.04712.11
5.1.20.0070.05012.11
5.1.10.0100.03312.11
5.1.00.0000.04012.11
5.0.50.0030.03712.11
5.0.40.0030.05312.11
5.0.30.0030.03712.11
5.0.20.0000.03312.11
5.0.10.0030.03712.11
5.0.00.0030.05712.11
4.4.90.0000.03012.11
4.4.80.0000.03312.11
4.4.70.0030.02012.11
4.4.60.0070.01312.11
4.4.50.0030.03712.11
4.4.40.0000.05712.11
4.4.30.0070.02012.11
4.4.20.0030.03312.11
4.4.10.0000.03712.11
4.4.00.0030.02712.11
4.3.110.0070.01712.11
4.3.100.0030.03012.11
4.3.90.0030.03312.11
4.3.80.0030.03012.11
4.3.70.0000.03312.11
4.3.60.0030.03012.11
4.3.50.0030.01712.11
4.3.40.0030.04312.11
4.3.30.0000.03712.11
4.3.20.0030.01712.11
4.3.10.0000.02312.11
4.3.00.0000.01712.11

preferences:
42.98 ms | 401 KiB | 5 Q