3v4l.org

run code in 300+ PHP versions simultaneously
<?php function testCrypt() { // Create a random salt $salt = 'abcdefghij1234567890ab'; //this could be moved to index.php pr something like that. if (version_compare(PHP_VERSION, '5.3.0') < 0) die('Minimum reqirements for this application are PHP >= 5.3.0 and your version is: ' . phpversion()); //fix issue #22 if (version_compare(PHP_VERSION, '5.3.7') >= 0) $salt = "$2x$10$" . $salt; if (version_compare(PHP_VERSION, '5.3.7') < 0) $salt = "$2a$10$" . $salt; // Hash the password with the salt $hash = crypt('ksjdfhs346fsad$%%Aâklsdj9842*&', $salt); echo $hash; } testCrypt();

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.0050.07814.94
7.3.120.0100.07214.94
7.3.110.0020.07714.82
7.3.100.0050.07214.91
7.3.90.0080.06714.87
7.3.80.0050.07015.07
7.3.70.0030.07114.69
7.3.60.0030.06914.73
7.3.50.0020.07214.80
7.3.40.0080.06814.67
7.3.30.0050.06814.73
7.3.20.0030.07016.67
7.3.10.0070.06716.60
7.3.00.0040.06916.66
7.2.250.0110.06814.98
7.2.240.0080.06915.08
7.2.230.0070.06915.13
7.2.220.0050.06815.15
7.2.210.0080.07114.94
7.2.200.0060.06615.10
7.2.190.0050.06915.10
7.2.180.0050.07115.04
7.2.170.0050.07014.94
7.2.130.0030.07516.88
7.2.120.0070.06916.79
7.2.110.0030.06916.66
7.2.100.0070.06516.95
7.2.90.0070.06716.95
7.2.80.0070.07216.95
7.2.70.0060.07117.03
7.2.60.0130.06416.96
7.2.50.0070.06517.05
7.2.40.0000.07416.70
7.2.30.0000.07416.94
7.2.20.0030.07016.77
7.2.10.0070.06817.07
7.2.00.0050.06918.10
7.1.330.0050.07015.80
7.1.320.0050.06815.71
7.1.310.0030.07015.91
7.1.300.0070.06815.79
7.1.290.0030.06815.99
7.1.280.0070.06915.76
7.1.270.0030.07015.82
7.1.260.0050.06915.58
7.1.250.0060.07115.72
7.1.100.0030.07218.00
7.1.70.0030.06917.18
7.1.60.0070.12619.32
7.1.50.0070.08616.90
7.1.00.0000.17022.39
7.0.200.0030.09416.83
7.0.140.0070.15322.21
7.0.110.0200.12720.02
7.0.100.0070.16019.90
7.0.90.0030.15019.87
7.0.80.0070.11320.01
7.0.70.0000.16019.91
7.0.60.0200.14320.02
7.0.50.0130.13020.43
7.0.40.0030.10320.26
7.0.30.0030.11020.19
7.0.20.0030.10320.05
7.0.10.0030.10320.07
7.0.00.0030.10319.95
5.6.280.0070.15720.89
5.6.250.0130.12020.59
5.6.240.0030.16320.67
5.6.230.0070.15320.48
5.6.220.0100.15720.66
5.6.210.0130.13720.63
5.6.200.0170.09321.23
5.6.190.0000.10721.11
5.6.180.0000.10721.05
5.6.170.0030.10321.22
5.6.160.0000.11720.99
5.6.150.0030.11021.27
5.6.140.0000.13320.93
5.6.130.0070.09020.99
5.6.120.0030.10321.14
5.6.110.0070.11321.02
5.6.100.0070.09020.94
5.6.90.0000.10721.25
5.6.80.0030.12720.48
5.6.70.0000.10320.53
5.6.60.0000.11020.32
5.6.50.0030.10020.30
5.6.40.0030.09020.50
5.6.30.0100.15320.50
5.6.20.0000.16320.55
5.6.10.0100.15320.29
5.6.00.0170.15720.33
5.5.380.0030.14720.32
5.5.370.0100.15720.55
5.5.360.0170.13720.37
5.5.350.0070.17320.47
5.5.340.0070.12321.04
5.5.330.0070.14020.81
5.5.320.0000.11320.91
5.5.310.0070.10020.70
5.5.300.0070.11720.91
5.5.290.0000.10720.96
5.5.280.0000.09320.89
5.5.270.0030.10320.70
5.5.260.0100.14720.71
5.5.250.0030.12020.73
5.5.240.0000.10320.33
5.5.230.0000.10320.16
5.5.220.0100.11020.12
5.5.210.0070.09720.27
5.5.200.0000.15020.30
5.5.190.0030.16320.10
5.5.180.0130.16320.30
5.5.160.0100.14320.12
5.5.150.0270.12720.09
5.5.140.0000.15320.21
5.5.130.0070.14720.33
5.5.120.0070.15020.38
5.5.110.0100.15320.16
5.5.100.0000.15320.14
5.5.90.0070.15720.00
5.5.80.0100.15020.15
5.5.70.0000.16020.10
5.5.60.0030.17320.11
5.5.50.0030.15720.01
5.5.40.0070.15020.18
5.5.30.0070.11020.13
5.5.20.0030.15020.06
5.5.10.0030.12320.01
5.5.00.0070.15020.16
5.4.450.0070.10319.55
5.4.440.0030.10019.27
5.4.430.0000.10319.56
5.4.420.0030.11019.66
5.4.410.0170.07719.23
5.4.400.0030.15018.99
5.4.390.0200.08318.99
5.4.380.0030.09719.01
5.4.370.0070.11319.02
5.4.360.0070.10019.14
5.4.350.0100.14019.34
5.4.340.0000.14718.98
5.4.320.0030.15319.00
5.4.310.0100.14719.23
5.4.300.0070.15019.09
5.4.290.0030.11019.16
5.4.280.0070.11719.23
5.4.270.0070.15718.98
5.4.260.0200.13719.16
5.4.250.0100.14719.24
5.4.240.0100.15319.24
5.4.230.0100.16719.13
5.4.220.0070.13018.95
5.4.210.0100.14019.14
5.4.200.0100.16719.25
5.4.190.0070.14719.30
5.4.180.0100.09319.34
5.4.170.0130.14019.15
5.4.160.0070.15018.98
5.4.150.0000.14019.21
5.4.140.0100.13316.36
5.4.130.0100.10016.50
5.4.120.0030.14316.29
5.4.110.0100.15016.57
5.4.100.0070.09316.51
5.4.90.0170.14716.59
5.4.80.0030.11016.57
5.4.70.0030.13316.57
5.4.60.0000.11016.28
5.4.50.0000.15016.52
5.4.40.0000.14016.29
5.4.30.0070.10316.54
5.4.20.0070.15016.51
5.4.10.0100.15016.43
5.4.00.0100.15715.99
5.3.290.0000.10314.90
5.3.280.0000.15314.72
5.3.270.0100.14714.46
5.3.260.0000.12314.62
5.3.250.0070.16314.68
5.3.240.0070.13014.69
5.3.230.0070.14714.55
5.3.220.0070.14014.64
5.3.210.0270.10014.65
5.3.200.0100.15714.42
5.3.190.0030.15714.42
5.3.180.0000.15714.55
5.3.170.0070.16314.68
5.3.160.0070.16014.69
5.3.150.0030.16014.70
5.3.140.0130.13314.56
5.3.130.0070.14314.54
5.3.120.0070.10714.58
5.3.110.0100.14314.68
5.3.100.0100.14314.05
5.3.90.0030.10714.05
5.3.80.0170.15714.02
5.3.70.0070.15314.14
5.3.60.0030.16314.14
5.3.50.0100.14013.80
5.3.40.0100.16014.18
5.3.30.0000.10713.92
5.3.20.0030.12313.68
5.3.10.0000.14013.61
5.3.00.0070.14313.71
5.2.170.0070.06011.13
5.2.160.0030.06311.14
5.2.150.0000.07011.14
5.2.140.0000.06311.11
5.2.130.0070.05711.09
5.2.120.0070.02311.09
5.2.110.0100.05711.16
5.2.100.0070.03011.12
5.2.90.0030.06311.19
5.2.80.0070.05710.95
5.2.70.0070.06011.08
5.2.60.0030.06311.11
5.2.50.0130.05310.99
5.2.40.0100.05711.07
5.2.30.0070.05310.94
5.2.20.0030.06011.06
5.2.10.0170.04710.84
5.2.00.0070.05710.73
5.1.60.0030.03010.05
5.1.50.0030.0509.98
5.1.40.0030.05710.23
5.1.30.0100.04710.35
5.1.20.0130.05010.34
5.1.10.0030.05010.14
5.1.00.0030.05310.03
5.0.50.0030.0438.54
5.0.40.0100.0378.49
5.0.30.0000.0408.21
5.0.20.0100.0378.21
5.0.10.0100.0378.21
5.0.00.0030.0538.23
4.4.90.0030.0178.21
4.4.80.0000.0208.21
4.4.70.0030.0308.21
4.4.60.0070.0308.21
4.4.50.0000.0208.21
4.4.40.0000.0608.21
4.4.30.0000.0378.21
4.4.20.0070.0308.21
4.4.10.0030.0378.21
4.4.00.0070.0478.21
4.3.110.0070.0308.21
4.3.100.0030.0308.21
4.3.90.0100.0278.21
4.3.80.0000.0538.21
4.3.70.0000.0338.21
4.3.60.0000.0378.21
4.3.50.0030.0338.21
4.3.40.0030.0478.21
4.3.30.0070.0308.21
4.3.20.0000.0208.21
4.3.10.0000.0378.21
4.3.00.0000.0378.21

preferences:
41.75 ms | 401 KiB | 5 Q