3v4l.org

run code in 300+ PHP versions simultaneously
<?php function digestPassword($password, $salt = null) { static $cryptPrefix = '$2y$10$'; return [ substr(crypt($password, $cryptPrefix . $salt . '$'), 7), substr(crypt($password, $cryptPrefix . $salt), 7), ]; } var_dump(digestPassword('foobar', 'jSzEr3UNlNP8CT4tDRSjr'));

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.60.0130.00318.07
8.3.50.0120.00822.85
8.3.40.0100.00618.85
8.3.30.0150.00319.18
8.3.20.0030.00520.29
8.3.10.0080.00021.71
8.3.00.0040.00419.02
8.2.180.0070.01425.92
8.2.170.0060.00922.96
8.2.160.0090.00619.07
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0030.00520.65
8.2.110.0050.00520.39
8.2.100.0080.00317.84
8.2.90.0030.00617.84
8.2.80.0080.00019.20
8.2.70.0040.00417.80
8.2.60.0040.00417.79
8.2.50.0000.00818.16
8.2.40.0030.00520.40
8.2.30.0000.00719.38
8.2.20.0060.05817.55
8.2.10.0030.06118.00
8.2.00.0100.05617.67
8.1.280.0170.00725.92
8.1.270.0050.00324.66
8.1.260.0030.00626.35
8.1.250.0000.00828.09
8.1.240.0090.00022.48
8.1.230.0040.00720.88
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.22
8.1.190.0030.00817.23
8.1.180.0080.00018.10
8.1.170.0000.00818.65
8.1.160.0070.00018.84
8.1.150.0070.05718.97
8.1.140.0030.06017.27
8.1.130.0030.06017.72
8.1.120.0030.06017.30
8.1.110.0000.06517.40
8.1.100.0070.05917.35
8.1.90.0000.06417.29
8.1.80.0000.06417.42
8.1.70.0060.05817.25
8.1.60.0070.05917.42
8.1.50.0070.05917.54
8.1.40.0030.06117.41
8.1.30.0030.06117.57
8.1.20.0030.06117.61
8.1.10.0060.05817.48
8.1.00.0070.05917.25
8.0.300.0000.00721.95
8.0.290.0040.00416.63
8.0.280.0070.00018.35
8.0.270.0000.06317.17
8.0.260.0030.06018.30
8.0.250.0030.06016.84
8.0.240.0030.06116.77
8.0.230.0000.06416.79
8.0.220.0060.05716.84
8.0.210.0000.06416.77
8.0.200.0030.06116.89
8.0.190.0070.05916.88
8.0.180.0000.06516.71
8.0.170.0030.06216.77
8.0.160.0070.05916.77
8.0.150.0000.06316.82
8.0.140.0000.06416.75
8.0.130.0030.06013.23
8.0.120.0030.06116.76
8.0.110.0030.06216.92
8.0.100.0030.06116.71
8.0.90.0030.06016.87
8.0.80.0220.08616.76
8.0.70.0030.06016.71
8.0.60.0070.05716.80
8.0.50.0000.06416.70
8.0.30.0100.09017.03
8.0.20.0070.10017.40
8.0.10.0070.05717.01
8.0.00.0070.09116.73
7.4.330.0030.06215.03
7.4.320.0000.06416.57
7.4.300.0000.06416.50
7.4.290.0030.06116.44
7.4.280.0030.06216.33
7.4.270.0000.06316.60
7.4.260.0000.06616.58
7.4.250.0030.06116.51
7.4.240.0020.06216.48
7.4.230.0000.06316.25
7.4.220.0060.11216.36
7.4.210.0100.10216.49
7.4.200.0030.06116.57
7.4.160.0100.08816.47
7.4.150.0160.09317.40
7.4.140.0120.08917.86
7.4.130.0070.09216.44
7.4.120.0100.08816.56
7.4.110.0100.09616.59
7.4.100.0100.09616.44
7.4.90.0100.08816.49
7.4.80.0100.09719.39
7.4.70.0000.09716.54
7.4.60.0150.08716.48
7.4.50.0070.06516.27
7.4.40.0160.08816.33
7.4.30.0170.08916.52
7.4.00.0030.07514.54
7.3.330.0030.06213.38
7.3.320.0000.06313.14
7.3.310.0000.06316.16
7.3.300.0070.05616.18
7.3.290.0050.10016.32
7.3.280.0030.10216.28
7.3.270.0130.08417.40
7.3.260.0100.08716.40
7.3.250.0080.09016.37
7.3.240.0070.09216.55
7.3.230.0100.09616.42
7.3.210.0030.09516.49
7.3.200.0130.08519.39
7.3.190.0130.09316.38
7.3.180.0060.09116.48
7.3.170.0100.08616.65
7.3.160.0100.08516.54
7.2.330.0070.09316.59
7.2.320.0030.09616.70
7.2.310.0070.09416.72
7.2.300.0070.09216.62
7.2.290.0090.08916.76
7.2.60.0030.06916.60
7.1.200.0030.07415.64
7.1.70.0030.06516.86
7.1.60.0130.12519.57
7.1.50.0100.11516.96
7.1.00.0100.16022.42
7.0.200.0200.06116.87
7.0.140.0030.08722.07
7.0.60.0030.10720.09
7.0.50.0000.16717.89
7.0.40.0070.12020.24
7.0.30.0370.14020.24
7.0.20.0270.11720.21
7.0.10.0200.12320.17
7.0.00.0030.16720.12
5.6.280.0030.16320.93
5.6.210.0070.16020.44
5.6.200.0030.16318.18
5.6.190.0030.10320.33
5.6.180.3970.10320.67
5.6.170.0230.15320.44
5.6.160.0070.16320.54
5.6.150.0030.10318.26
5.6.140.0070.10318.15
5.6.130.0130.15318.19
5.6.120.0070.12321.14
5.6.110.0030.14020.99
5.6.100.0200.15721.09
5.6.90.0100.14321.04
5.6.80.0100.12020.36
5.6.70.4400.09320.52
5.5.350.0300.14020.53
5.5.340.0130.15717.99
5.5.330.0170.14720.27
5.5.320.0330.11020.20
5.5.310.0270.15020.24
5.5.300.0070.10018.01
5.5.290.0100.10317.95
5.5.280.0170.14020.80
5.5.270.0000.12720.76
5.5.260.0130.15720.76
5.5.250.0030.14320.49
5.5.240.0030.10320.24
5.4.450.1030.17719.52
5.4.440.0470.22019.55
5.4.430.0100.21319.51
5.4.420.0100.21719.52
5.4.410.0130.21019.27
5.4.400.0070.21019.07
5.4.390.0170.20719.27
5.4.380.0130.22018.73
5.4.370.0200.21318.64
5.4.360.0270.20018.61
5.4.350.0130.21718.44
5.4.340.0170.21018.78
5.4.320.0270.20318.75
5.4.310.0270.23718.50
5.4.300.0200.21318.58
5.4.290.0270.20018.75
5.4.280.0230.23718.74
5.4.270.0230.20318.64
5.4.260.0170.21018.74
5.4.250.0130.21318.74
5.4.240.0170.21318.72
5.4.230.0100.22018.60
5.4.220.0170.21318.73
5.4.210.0200.21018.69
5.4.200.0170.21316.71
5.4.190.0230.20718.46
5.4.180.0200.20718.61
5.4.170.0070.23018.58
5.4.160.0100.22018.73
5.4.150.0300.20018.70
5.4.140.0130.21316.27
5.4.130.0200.20316.42
5.4.120.0170.20716.29
5.4.110.0300.22016.17
5.4.100.0200.20716.43
5.4.90.0030.22016.26
5.4.80.0200.20716.44
5.4.70.0130.21316.23
5.4.60.0270.19716.25
5.4.50.0070.21716.26
5.4.40.0200.20316.14
5.4.30.0170.24016.25
5.4.20.0170.21016.16
5.4.10.0130.21016.20
5.4.00.0230.19715.78
5.3.290.0230.04714.79
5.3.280.0230.04314.73
5.3.270.0230.04314.64
5.3.260.0270.04014.59
5.3.250.0200.05014.66
5.3.240.0230.04314.70
5.3.230.0230.04314.66
5.3.220.0100.05714.75
5.3.210.0230.04714.58
5.3.200.0230.04014.77
5.3.190.0300.03714.60
5.3.180.0100.05714.75
5.3.170.0130.05014.77
5.3.160.0130.05014.59
5.3.150.0130.05014.77
5.3.140.0100.05314.69
5.3.130.0070.06014.59
5.3.120.0100.06014.59
5.3.110.0200.05014.58
5.3.100.0100.05314.22
5.3.90.0170.04714.15
5.3.80.0100.05314.01
5.3.70.0130.05014.13
5.3.60.0070.05714.05
5.3.50.0130.05013.99
5.3.40.0100.05714.00
5.3.30.0130.05013.98
5.3.20.0100.05713.73
5.3.10.0200.04313.70
5.3.00.0130.05013.68
5.2.170.0170.03711.20
5.2.160.0030.04711.16
5.2.150.0130.04011.18
5.2.140.0100.04311.16
5.2.130.0200.03011.08
5.2.120.0200.03011.23
5.2.110.0100.04011.14
5.2.100.0000.05011.10
5.2.90.0100.04011.12
5.2.80.0230.03711.09
5.2.70.0070.05011.13
5.2.60.0070.04311.12
5.2.50.0000.05011.07
5.2.40.0130.03711.09
5.2.30.0100.04310.97
5.2.20.0130.03711.04
5.2.10.0170.03310.86
5.2.00.0030.04710.83
5.1.60.0030.04010.18
5.1.50.0070.03710.18
5.1.40.0170.02710.02
5.1.30.0100.03710.39
5.1.20.0070.04010.57
5.1.10.0100.03310.25
5.1.00.0070.03710.16
5.0.50.0100.0238.65
5.0.40.0130.0208.49
5.0.30.0100.0408.42
5.0.20.0070.0278.38
5.0.10.0100.0238.36
5.0.00.0030.0608.27
4.4.90.0100.0175.91
4.4.80.0000.0276.00
4.4.70.0030.0235.87
4.4.60.0100.0205.99
4.4.50.0000.0275.91
4.4.40.0130.0275.94
4.4.30.0030.0235.89
4.4.20.0070.0206.07
4.4.10.0030.0235.95
4.4.00.0070.0305.89
4.3.110.0070.0205.86
4.3.100.0000.0235.84
4.3.90.0000.0235.79
4.3.80.0070.0305.82
4.3.70.0030.0205.78
4.3.60.0030.0205.88
4.3.50.0130.0135.82
4.3.40.0070.0305.74
4.3.30.0030.0204.64
4.3.20.0000.0234.57
4.3.10.0030.0204.63
4.3.00.0370.03014.50

preferences:
53.25 ms | 401 KiB | 5 Q