3v4l.org

run code in 300+ PHP versions simultaneously
<?php function genString($length = 22){ $s = ''; $chars = array_merge(range('A','Z'), range('a','z'), range(0,9)); while($length > 0){ $randKey = array_rand($chars, 1); $s .= $chars[$randKey]; $length--; } return $s; } $salt = '$2y$10$'.genString(); echo 'Salt: '.$salt.'<br>'; $password = '5adrftg'; $hash = crypt($password, $salt); echo 'Hash: '.$hash.' -- Strlen: '.strlen($hash).'<br>'; //echo PHP_VERSION_ID.'<br>'; if (crypt($password, $hash) == $hash) { echo "Password verified!"; }

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.0070.14015.10
7.3.120.0050.13814.87
7.3.110.0080.13914.87
7.3.100.0030.13414.96
7.3.90.0100.12914.75
7.3.80.0030.13115.02
7.3.70.0030.13114.78
7.3.60.0050.13114.94
7.3.50.0030.13714.82
7.3.40.0020.13214.88
7.3.30.0050.12814.88
7.3.20.0100.12716.60
7.3.10.0050.13316.72
7.3.00.0090.12716.75
7.2.250.0070.13515.04
7.2.240.0080.13815.09
7.2.230.0030.13315.16
7.2.220.0100.12815.29
7.2.210.0080.13215.03
7.2.200.0070.12514.97
7.2.190.0050.13015.26
7.2.180.0030.13314.93
7.2.170.0020.13315.00
7.2.160.0070.13215.14
7.2.150.0030.13117.17
7.2.140.0000.13517.04
7.2.130.0070.13316.88
7.2.120.0050.13616.97
7.2.110.0070.12916.84
7.2.100.0080.13217.03
7.2.90.0070.13516.94
7.2.80.0100.12716.88
7.2.70.0080.13116.95
7.2.60.0050.13216.75
7.2.50.0050.13317.04
7.2.40.0080.12917.09
7.2.30.0070.13217.02
7.2.20.0020.13616.67
7.2.10.0050.12916.89
7.2.00.0080.12617.91
7.1.330.0060.13215.95
7.1.320.0030.13315.75
7.1.310.0050.12915.92
7.1.300.0020.13215.69
7.1.290.0050.13115.69
7.1.280.0030.13815.74
7.1.270.0030.13415.79
7.1.260.0030.13215.67
7.1.250.0030.13215.73
7.1.240.0080.12515.83
7.1.230.0070.12815.53
7.1.220.0020.13915.80
7.1.210.0020.13315.78
7.1.200.0070.13515.76
7.1.190.0050.13315.77
7.1.180.0050.13415.87
7.1.170.0070.13215.83
7.1.160.0130.12315.73
7.1.150.0000.13515.65
7.1.140.0020.13415.79
7.1.130.0030.13115.73
7.1.120.0050.13115.82
7.1.110.0080.12915.83
7.1.100.0000.13315.91
7.1.90.0070.13115.75
7.1.80.0070.13215.96
7.1.70.0030.13116.21
7.1.60.0080.14616.94
7.1.50.0060.15216.23
7.1.40.0070.13515.95
7.1.30.0030.12915.82
7.1.20.0070.13015.63
7.1.10.0050.13115.64
7.1.00.0080.15617.98
7.0.330.0080.12515.46
7.0.320.0050.12815.39
7.0.310.0050.13215.45
7.0.300.0070.12815.31
7.0.290.0030.13415.31
7.0.280.0070.12815.08
7.0.270.0070.12915.35
7.0.260.0070.12515.24
7.0.250.0070.12615.53
7.0.240.0070.13215.41
7.0.230.0020.13215.53
7.0.220.0050.12915.37
7.0.210.0050.12615.39
7.0.200.0030.13715.74
7.0.190.0100.12715.38
7.0.180.0050.12815.10
7.0.170.0050.13115.36
7.0.160.0070.13015.29
7.0.150.0030.12915.29
7.0.140.0020.16417.51
7.0.130.0080.12715.32
7.0.120.0070.16417.53
7.0.110.0020.13315.14
7.0.100.0050.13515.18
7.0.90.0030.13715.28
7.0.80.0020.13615.31
7.0.70.0070.12915.17
7.0.60.0080.14016.84
7.0.50.0020.15716.20
7.0.40.0030.16815.78
7.0.30.0110.14715.53
7.0.20.0120.14415.77
7.0.10.0040.14015.47
7.0.00.0070.15515.73
5.6.400.0030.13014.33
5.6.390.0000.13714.53
5.6.380.0070.12614.39
5.6.370.0070.13014.20
5.6.360.0020.13614.38
5.6.350.0030.13114.18
5.6.340.0020.13414.39
5.6.330.0070.12614.33
5.6.320.0030.13114.25
5.6.310.0080.13414.47
5.6.300.0030.12814.71
5.6.290.0020.13314.40
5.6.280.0040.16616.74
5.6.270.0050.13114.37
5.6.260.0050.12914.60
5.6.250.0050.13214.40
5.6.240.0050.13514.28
5.6.230.0070.13114.28
5.6.220.0050.13214.23
5.6.210.0090.15016.49
5.6.200.0040.13815.70
5.6.190.0040.14616.43
5.6.180.0090.14316.34
5.6.170.0090.14216.50
5.6.160.0030.16116.41
5.6.150.0030.14015.63
5.6.140.0040.15115.59
5.6.130.0090.15915.60
5.6.120.0060.16616.47
5.6.110.0080.16116.52
5.6.100.0100.16016.61
5.6.90.0070.15916.47
5.6.80.0060.16616.35
5.6.70.0030.13414.10
5.6.60.0080.13014.22
5.6.50.0070.13114.28
5.6.40.0030.13214.17
5.6.30.0030.14014.09
5.6.20.0030.13614.32
5.6.10.0070.12714.19
5.6.00.0050.13214.14
5.5.380.0050.13112.80
5.5.370.0030.13412.77
5.5.360.0030.13412.87
5.5.350.0120.16315.31
5.5.340.0030.16014.52
5.5.330.0070.16015.21
5.5.320.0130.16315.11
5.5.310.0130.14915.41
5.5.300.0040.14814.60
5.5.290.0130.15514.50
5.5.280.0030.14515.45
5.5.270.0090.15615.24
5.5.260.0050.14715.59
5.5.250.0040.15815.21
5.5.240.0040.16315.23
5.5.230.0070.12912.75
5.5.220.0070.12612.71
5.5.210.0080.12612.67
5.5.200.0050.12812.68
5.5.190.0050.12912.57
5.5.180.0080.12612.70
5.5.170.0080.12512.61
5.5.160.0050.12712.74
5.5.150.0070.12712.81
5.5.140.0030.13912.82
5.5.130.0070.13412.63
5.5.120.0080.12712.84
5.5.110.0030.12712.83
5.5.100.0070.13412.79
5.5.90.0050.12912.77
5.5.80.0030.13112.69
5.5.70.0080.12412.70
5.5.60.0030.13512.83
5.5.50.0030.13112.83
5.5.40.0030.12912.80
5.5.30.0050.13212.71
5.5.20.0030.13312.63
5.5.10.0050.13512.76
5.5.00.0050.13512.63
5.4.450.0080.14913.94
5.4.440.0040.14013.93
5.4.430.0090.15613.92
5.4.420.0090.15913.85
5.4.410.0080.15013.82
5.4.400.0060.14013.71
5.4.390.0070.15513.90
5.4.380.0040.16213.80
5.4.370.0070.15913.80
5.4.360.0110.14113.70
5.4.350.0100.14113.78
5.4.340.0190.15513.82
5.4.330.0070.13011.24
5.4.320.0080.16313.79
5.4.310.0020.16313.85
5.4.300.0080.16113.76
5.4.290.0060.16013.78
5.4.280.0060.14913.77
5.4.270.0070.14813.76
5.4.260.0010.14313.75
5.4.250.0040.14613.79
5.4.240.0030.14113.73
5.4.230.0060.14813.80
5.4.220.0020.16713.84
5.4.210.0030.14513.90
5.4.200.0080.14113.70
5.4.190.0060.14613.71
5.4.180.0050.14713.68
5.4.170.0050.16313.84
5.4.160.0030.14313.83
5.4.150.0060.14113.71
5.4.140.0030.14812.85
5.4.130.0040.16712.81
5.4.120.0040.15912.95
5.4.110.0060.15712.89
5.4.100.0040.14012.89
5.4.90.0020.14212.84
5.4.80.0010.14412.89
5.4.70.0040.14112.86
5.4.60.0070.14712.86
5.4.50.0070.16012.83
5.4.40.0040.14612.88
5.4.30.0000.14112.88
5.4.20.0070.15112.89
5.4.10.0090.13812.90
5.4.00.0020.14112.65
5.3.290.0040.16112.29
5.3.280.0040.14712.24
5.3.270.0040.16012.22
5.3.260.0140.13912.26
5.3.250.0050.16112.26
5.3.240.0070.15212.22
5.3.230.0120.14612.25
5.3.220.0070.16012.24
5.3.210.0060.15212.20
5.3.200.0030.14312.25
5.3.190.0030.15512.21
5.3.180.0020.14112.23
5.3.170.0040.15412.24
5.3.160.0030.15212.24
5.3.150.0060.14312.25
5.3.140.0060.15412.24
5.3.130.0040.14012.28
5.3.120.0030.13712.24
5.3.110.0040.14112.20
5.3.100.0010.13912.11
5.3.90.0020.13812.10
5.3.80.0030.13712.06
5.3.70.0070.13512.10
5.3.60.0040.01512.09
5.3.50.0010.01712.05
5.3.40.0040.01712.06
5.3.30.0090.01312.06
5.3.20.0050.01811.94
5.3.10.0040.01611.96
5.3.00.0010.01711.91
5.2.170.0030.01811.17
5.2.160.0000.02011.18
5.2.150.0030.01711.21
5.2.140.0030.01411.21
5.2.130.0030.01811.13
5.2.120.0040.01311.13
5.2.110.0010.01811.16
5.2.100.0030.01711.10
5.2.90.0050.01311.13
5.2.80.0050.01511.14
5.2.70.0040.01711.12
5.2.60.0060.01311.15
5.2.50.0020.01811.10
5.2.40.0030.01511.09
5.2.30.0060.01311.06
5.2.20.0050.01411.10
5.2.10.0030.01611.02
5.2.00.0050.01510.98
5.1.60.0030.01310.57
5.1.50.0080.01010.58
5.1.40.0030.01510.57
5.1.30.0030.01510.79
5.1.20.0040.01210.80
5.1.10.0020.01710.63
5.1.00.0000.01710.61
5.0.50.0020.0249.88
5.0.40.0040.0129.87
5.0.30.0050.0209.75
5.0.20.0000.0149.73
5.0.10.0120.0179.73
5.0.00.0010.0389.73
4.4.90.0010.0119.73
4.4.80.0030.0089.73
4.4.70.0010.0109.73
4.4.60.0050.0089.73
4.4.50.0020.0109.73
4.4.40.0000.0159.73
4.4.30.0020.0109.73
4.4.20.0060.0089.73
4.4.10.0070.0229.73
4.4.00.0030.0159.73
4.3.110.0020.0129.73
4.3.100.0000.0229.73
4.3.90.0030.0179.73
4.3.80.0010.0219.73
4.3.70.0000.0129.73
4.3.60.0020.0109.73
4.3.50.0020.0209.73
4.3.40.0060.0269.73
4.3.30.0020.0229.73
4.3.20.0000.0159.73
4.3.10.0000.0119.73
4.3.00.0020.0129.73

preferences:
32.66 ms | 401 KiB | 5 Q