3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $2a$12$BMxrzFUgKhjg3KYLUxQH7.ewjXzBUiy7MmIICALXHlOYudsAFQnGa $hash = crypt('falcon', '$2a$12$BMxrzFUgKhjg3KYLUxQH7K'); var_dump($hash == crypt('falcon', $hash)); var_dump($hash == '$2a$12$BMxrzFUgKhjg3KYLUxQH7.ewjXzBUiy7MmIICALXHlOYudsAFQnGa'); /* $salt = substr(str_replace('+', '.', base64_encode(sha1(microtime(true), true))), 0, 22); // 2a is the bcrypt algorithm selector, see http://php.net/crypt // 12 is the workload factor (around 300ms on my Core i7 machine), see http://php.net/crypt echo $hash = crypt('falcon', '$2a$12$' . $salt); var_dump('$2a$12$' . $salt); // we can now use the generated hash as the argument to crypt(), since it too will contain $a2$12$... with a variation of the hash. No need to store the salt anymore, just the hash is enough! var_dump($hash == crypt('foo', $hash)); // true var_dump($hash == crypt('falcon', $hash)); // 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)
8.3.90.0030.42518.56
8.3.80.0000.46518.18
8.3.70.0130.76316.50
8.3.60.0100.75418.56
8.3.50.0120.76221.15
8.3.40.0070.75018.58
8.3.30.0130.74218.92
8.3.20.0030.40320.10
8.3.10.0030.40422.12
8.3.00.0100.39620.69
8.2.210.0070.40026.77
8.2.200.0100.45318.29
8.2.190.0130.74916.60
8.2.180.0170.74216.32
8.2.170.0070.75822.96
8.2.160.0030.75022.09
8.2.150.0030.40324.18
8.2.140.0030.40424.66
8.2.130.0100.41826.16
8.2.120.0030.40419.23
8.2.110.0100.40221.06
8.2.100.0030.45817.78
8.2.90.0030.45617.78
8.2.80.0070.45217.97
8.2.70.0000.45917.63
8.2.60.0070.45117.63
8.2.50.0030.45517.91
8.2.40.0030.45418.04
8.2.30.0030.45418.00
8.2.20.0070.45017.61
8.2.10.0030.46617.58
8.2.00.0030.45717.67
8.1.290.0070.45718.88
8.1.280.0130.74425.92
8.1.270.0030.41222.05
8.1.260.0030.40326.35
8.1.250.0030.40728.09
8.1.240.0130.39822.29
8.1.230.0100.45720.98
8.1.220.0030.45617.74
8.1.210.0030.45518.77
8.1.200.0000.46717.22
8.1.190.0070.45017.23
8.1.180.0100.49018.10
8.1.170.0070.44917.65
8.1.160.0000.45922.24
8.1.150.0030.45518.71
8.1.140.0070.45017.49
8.1.130.0000.46017.37
8.1.120.0000.45917.38
8.1.110.0100.49617.49
8.1.100.0030.45317.45
8.1.90.0030.45617.46
8.1.80.0070.45017.52
8.1.70.0030.45317.38
8.1.60.0100.45017.60
8.1.50.0000.45817.57
8.1.40.0030.45617.54
8.1.30.0030.45317.56
8.1.20.0000.46017.52
8.1.10.0070.45017.47
8.1.00.0000.46017.39
8.0.300.0000.45619.75
8.0.290.0030.45616.63
8.0.280.0000.45718.35
8.0.270.0000.46217.12
8.0.260.0030.46216.62
8.0.250.0030.45616.89
8.0.240.0030.45416.91
8.0.230.0000.45716.80
8.0.220.0000.45816.71
8.0.210.0100.44816.82
8.0.200.0000.46016.94
8.0.190.0000.45816.94
8.0.180.0000.45816.71
8.0.170.0030.45516.88
8.0.160.0000.45716.65
8.0.150.0000.45716.66
8.0.140.0000.45716.81
8.0.130.0030.45213.25
8.0.120.0070.45416.79
8.0.110.0030.45416.73
8.0.100.0030.45416.91
8.0.90.0030.45816.90
8.0.80.0130.68516.79
8.0.70.0060.45016.73
8.0.60.0030.45316.92
8.0.50.0000.45716.69
8.0.30.0100.64916.96
8.0.20.0170.63517.40
8.0.10.0000.45716.91
8.0.00.0100.65516.76
7.4.330.0000.45315.00
7.4.320.0030.45416.60
7.4.300.0070.45216.37
7.4.290.0000.45816.36
7.4.280.0070.45216.54
7.4.270.0030.46116.49
7.4.260.0000.45816.55
7.4.250.0070.45316.49
7.4.240.0020.45616.53
7.4.230.0030.45516.43
7.4.220.0030.76616.47
7.4.210.0090.71716.57
7.4.200.0000.45516.72
7.4.190.0030.45416.64
7.4.160.0030.70716.63
7.4.150.0160.63517.40
7.4.140.0110.65617.86
7.4.130.0210.67716.37
7.4.120.0080.66616.58
7.4.110.0100.65316.32
7.4.100.0090.68716.36
7.4.90.0100.64716.35
7.4.80.0100.65019.39
7.4.70.0160.64716.37
7.4.60.0260.63116.50
7.4.50.0070.34816.34
7.4.40.0100.48622.77
7.4.30.0130.64916.53
7.4.00.0070.48715.09
7.3.330.0000.45513.11
7.3.320.0030.45313.21
7.3.310.0070.45016.34
7.3.300.0000.45816.25
7.3.290.0030.68516.25
7.3.280.0120.69816.22
7.3.270.0000.65317.40
7.3.260.0160.65616.52
7.3.250.0160.65116.30
7.3.240.0100.65316.43
7.3.230.0130.66816.39
7.3.210.0060.65116.40
7.3.200.0100.66216.18
7.3.190.0100.67616.26
7.3.180.0000.66116.46
7.3.170.0100.68816.27
7.3.160.0130.63416.61
7.3.120.0070.48614.80
7.2.330.0130.67216.64
7.2.320.0280.67416.45
7.2.310.0100.63816.40
7.2.300.0100.66016.31
7.2.290.0120.64616.29
7.1.70.0070.48716.83
7.1.60.0100.56719.82
7.1.50.0100.52516.99
7.1.00.0070.46022.45
7.0.200.0000.49116.78
7.0.140.0070.54322.08
7.0.80.0570.54319.88
7.0.70.0430.58719.88
7.0.60.0470.57320.05
7.0.50.0430.55320.25
7.0.40.0070.46320.05
7.0.30.0130.60720.13
7.0.20.0030.49720.05
7.0.10.0100.53020.07
7.0.00.0070.55319.99
5.6.280.0100.56320.77
5.6.230.0030.57320.68
5.6.220.0100.57020.61
5.6.210.0000.61320.76
5.6.200.0100.58021.08
5.6.190.0000.51321.04
5.6.180.0070.44021.09
5.6.170.0030.61321.01
5.6.160.0070.60721.01
5.6.150.0030.57020.95
5.6.140.0030.59021.01
5.6.130.0130.54721.09
5.6.120.0100.60021.03
5.6.110.0000.52721.00
5.6.100.0100.57721.02
5.6.90.0130.59021.05
5.6.80.0070.49020.41
5.6.70.0030.53720.34
5.6.60.0070.59320.40
5.6.50.0030.57020.48
5.6.40.0100.58720.38
5.6.30.0170.60320.38
5.6.20.0070.47720.36
5.6.10.0030.44720.38
5.6.00.0070.58720.35
5.5.370.0130.58020.34
5.5.360.0100.51720.52
5.5.350.0100.44320.36
5.5.340.0100.58020.91
5.5.330.0000.44020.89
5.5.320.0100.44320.71
5.5.310.0100.57720.86
5.5.300.0030.61320.81
5.5.290.0200.59020.87
5.5.280.0030.56320.63
5.5.270.0000.50020.85
5.5.260.0000.44020.86
5.5.250.0070.46720.54
5.5.240.0130.58020.30
5.5.230.0100.58320.17
5.5.220.0170.58320.12
5.5.210.0600.54320.26
5.5.200.0070.57720.27
5.5.190.0130.59020.12
5.5.180.0100.59720.05
5.5.160.0170.59720.10
5.5.150.0330.45020.16
5.5.140.0030.43320.09
5.5.130.0030.54319.98
5.5.120.0030.43320.16
5.5.110.0100.43720.23
5.5.100.0070.54020.04
5.5.90.0030.60020.15
5.5.80.0100.57320.11
5.5.70.0100.54020.05
5.5.60.0030.48720.09
5.5.50.0100.53720.05
5.5.40.0100.60720.04
5.5.30.0070.52720.04
5.5.20.0000.47020.02
5.5.10.0030.53019.94
5.5.00.0030.43720.04
5.4.450.0030.60019.31
5.4.440.0070.61319.41
5.4.430.0100.58319.55
5.4.420.0100.44719.36
5.4.410.0000.43718.97
5.4.400.0070.60018.97
5.4.390.0030.43718.91
5.4.380.0070.58319.07
5.4.370.0030.47019.06
5.4.360.0130.59018.85
5.4.350.0070.48718.98
5.4.340.0070.45318.95
5.4.320.0030.50018.81
5.4.310.0030.44718.95
5.4.300.0000.44019.09
5.4.290.0130.44019.09
5.4.280.0030.43318.98
5.4.270.0070.44718.78
5.4.260.0070.56719.07
5.4.250.0070.43019.05
5.4.240.0000.54019.02
5.4.230.0100.55318.96
5.4.220.0100.50719.12
5.4.210.0070.48319.13
5.4.200.0030.44018.97
5.4.190.0070.56019.06
5.4.180.0000.59019.13
5.4.170.0000.47018.96
5.4.160.0130.58719.02
5.4.150.0070.50019.10
5.4.140.0030.45716.28
5.4.130.0070.60016.36
5.4.120.0030.54716.32
5.4.110.0030.58016.23
5.4.100.0070.57016.46
5.4.90.0070.57716.38
5.4.80.0100.56716.39
5.4.70.0370.58016.39
5.4.60.0070.58716.27
5.4.50.0070.57716.33
5.4.40.0030.53316.26
5.4.30.0070.57016.33
5.4.20.0030.59316.27
5.4.10.0070.49016.33
5.4.00.0070.43315.83
5.3.290.0130.42014.64
5.3.280.0000.59314.54
5.3.270.0030.57014.58
5.3.260.0030.47714.56
5.3.250.0100.59714.59
5.3.240.0030.57314.54
5.3.230.0030.57314.41
5.3.220.0030.55014.54
5.3.210.0100.58714.47
5.3.200.0070.54014.38
5.3.190.0030.58714.55
5.3.180.0100.56714.55
5.3.170.0070.48714.53
5.3.160.0030.53014.50
5.3.150.0030.58314.53
5.3.140.0070.55314.41
5.3.130.0030.47314.38
5.3.120.0070.57314.48
5.3.110.0030.57314.55
5.3.100.0000.55313.95
5.3.90.0000.53013.99
5.3.80.0000.45314.02
5.3.70.0000.58313.77
5.3.60.0070.59713.85
5.3.50.0070.46313.89
5.3.40.0070.60313.93
5.3.30.0100.53313.85
5.3.20.0030.55713.55
5.3.10.0030.60313.55
5.3.00.0700.56713.55
5.2.170.0070.06313.55
5.2.160.0070.06013.55
5.2.150.0030.06013.55
5.2.140.0030.03013.55
5.2.130.0030.05313.55
5.2.120.0100.04313.55
5.2.110.0000.06713.55
5.2.100.0070.05713.55
5.2.90.0100.05713.55
5.2.80.0000.04013.55
5.2.70.0070.06013.55
5.2.60.0070.03713.55
5.2.50.0070.03713.55
5.2.40.0070.03713.55
5.2.30.0030.03713.55
5.2.20.0030.06313.55
5.2.10.0100.04313.55
5.2.00.0030.05713.55
5.1.60.0070.05313.55
5.1.50.0000.06013.55
5.1.40.0030.05313.55
5.1.30.0070.03313.55
5.1.20.0030.05713.55
5.1.10.0130.05013.55
5.1.00.0070.04013.55
5.0.50.0070.03313.55
5.0.40.0030.04013.55
5.0.30.0070.06013.55
5.0.20.0000.04713.55
5.0.10.0030.04013.55
5.0.00.0070.06013.55
4.4.90.0030.01713.55
4.4.80.0000.02013.55
4.4.70.0030.02313.55
4.4.60.0070.02713.55
4.4.50.0070.02013.55
4.4.40.0030.04713.55
4.4.30.0070.02313.55
4.4.20.0030.03313.55
4.4.10.0030.02013.55
4.4.00.0000.03313.55
4.3.110.0000.02713.55
4.3.100.0070.03013.55
4.3.90.0000.03713.55
4.3.80.0000.04313.55
4.3.70.0000.03713.55
4.3.60.0030.03713.55
4.3.50.0030.03013.55
4.3.40.0000.05313.55
4.3.30.0000.04013.55
4.3.20.0000.03713.55
4.3.10.0100.02713.55
4.3.00.0000.03313.55

preferences:
30.47 ms | 401 KiB | 5 Q