3v4l.org

run code in 300+ PHP versions simultaneously
<?php function testCrypt() { // Create a random salt $salt = 'abcdefghij1234567890ab'; //format of Blowfish algorithm is "$2a$" followed by cost, or number of iterations (10) and then followed by random salt string $salt = "$2a$10$" . $salt; //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.0040.01414.88
7.3.120.0060.01114.79
7.3.110.0040.01214.82
7.3.100.0030.01214.80
7.3.90.0030.01114.91
7.3.80.0060.00714.74
7.3.70.0030.01014.81
7.3.60.0090.00714.62
7.3.50.0070.00714.67
7.3.40.0050.01014.75
7.3.30.0040.00614.58
7.3.20.0080.00516.69
7.3.10.0060.00716.65
7.3.00.0070.00716.63
7.2.250.0130.00315.20
7.2.240.0080.01015.06
7.2.230.0040.01215.02
7.2.220.0070.00914.96
7.2.210.0060.01114.91
7.2.200.0050.00815.03
7.2.190.0080.00815.04
7.2.180.0060.00914.97
7.2.170.0060.01115.01
7.2.160.0070.00815.05
7.2.150.0070.00916.91
7.2.140.0080.00816.81
7.2.130.0080.00817.04
7.2.120.0070.00916.85
7.2.110.0060.00816.86
7.2.100.0060.00716.81
7.2.90.0040.01016.89
7.2.80.0040.01016.84
7.2.70.0070.00816.78
7.2.60.0070.00616.89
7.2.50.0060.00816.81
7.2.40.0080.00816.82
7.2.30.0050.01016.82
7.2.20.0060.00816.77
7.2.10.0040.01016.90
7.2.00.0050.00916.97
7.1.330.0040.00915.69
7.1.320.0090.00715.64
7.1.310.0060.00915.74
7.1.300.0040.00915.73
7.1.290.0080.00715.62
7.1.280.0070.00815.61
7.1.270.0060.00515.65
7.1.260.0120.00515.67
7.1.250.0090.00415.72
7.1.240.0050.00615.85
7.1.230.0050.00915.65
7.1.220.0060.00815.76
7.1.210.0080.00615.84
7.1.200.0050.00915.54
7.1.190.0050.00715.68
7.1.180.0080.00215.69
7.1.170.0070.00715.68
7.1.160.0070.00515.96
7.1.150.0040.00915.72
7.1.140.0070.00815.72
7.1.130.0040.00915.66
7.1.120.0060.00715.85
7.1.110.0050.01015.86
7.1.100.0050.00915.95
7.1.90.0030.01015.63
7.1.80.0120.00515.74
7.1.70.0050.00816.34
7.1.60.0070.00917.16
7.1.50.0040.01116.20
7.1.40.0020.01015.73
7.1.30.0070.00415.89
7.1.20.0020.01015.66
7.1.10.0060.00315.73
7.1.00.0030.03317.90
7.0.330.0040.00915.47
7.0.320.0020.01015.27
7.0.310.0050.00915.50
7.0.300.0050.00915.27
7.0.290.0080.00715.29
7.0.280.0050.00515.42
7.0.270.0000.01015.35
7.0.260.0060.00315.42
7.0.250.0050.00815.42
7.0.240.0030.00815.36
7.0.230.0050.00915.41
7.0.220.0040.00415.27
7.0.210.0060.00915.33
7.0.200.0050.00615.57
7.0.190.0060.00615.37
7.0.180.0020.01315.25
7.0.170.0070.00815.52
7.0.160.0050.00815.26
7.0.150.0060.00615.39
7.0.140.0060.02817.51
7.0.130.0100.00315.30
7.0.120.0050.00615.47
7.0.110.0030.07215.43
7.0.100.0080.08016.84
7.0.90.0080.07616.99
7.0.80.0020.08116.95
7.0.70.0080.07916.94
7.0.60.0030.08116.93
7.0.50.0070.08817.19
7.0.40.0090.09115.75
7.0.30.0090.09415.46
7.0.20.0100.08915.52
7.0.10.0080.09815.74
7.0.00.0050.09615.67
5.6.400.0100.00314.22
5.6.390.0060.00614.63
5.6.380.0080.00714.62
5.6.370.0070.00514.32
5.6.360.0080.00614.31
5.6.350.0090.00414.39
5.6.340.0070.00414.42
5.6.330.0110.00114.13
5.6.320.0070.00714.29
5.6.310.0030.00814.11
5.6.300.0070.00714.57
5.6.290.0030.01014.54
5.6.280.0030.02916.74
5.6.270.0010.01114.19
5.6.260.0080.06614.36
5.6.250.0040.08316.34
5.6.240.0040.08216.51
5.6.230.0030.08216.41
5.6.220.0050.08116.39
5.6.210.0040.07916.42
5.6.200.0040.08116.61
5.6.190.0040.07916.59
5.6.180.0070.08216.50
5.6.170.0120.09116.57
5.6.160.0100.09416.41
5.6.150.0100.09816.47
5.6.140.0100.08116.63
5.6.130.0060.10016.59
5.6.120.0040.10116.53
5.6.110.0030.08416.59
5.6.100.0040.07716.60
5.6.90.0080.10016.45
5.6.80.0060.08316.32
5.6.70.0020.10016.15
5.6.60.0070.07216.19
5.6.50.0080.10416.25
5.6.40.0040.08216.23
5.6.30.0030.10616.34
5.6.20.0060.08416.33
5.6.10.0050.10216.25
5.6.00.0060.09816.32
5.5.380.0020.08215.35
5.5.370.0050.07915.13
5.5.360.0090.07215.13
5.5.350.0030.08815.30
5.5.340.0060.07815.38
5.5.330.0020.10015.57
5.5.320.0080.10115.34
5.5.310.0060.09915.49
5.5.300.0100.08315.30
5.5.290.0040.09715.52
5.5.280.0090.07715.43
5.5.270.0030.09415.48
5.5.260.0030.09915.37
5.5.250.0060.09015.38
5.5.240.0040.09415.22
5.5.230.0090.09415.13
5.5.220.0020.09115.04
5.5.210.0070.09815.14
5.5.200.0060.08615.19
5.5.190.0040.08315.02
5.5.180.0050.08415.11
5.5.170.0050.06312.78
5.5.160.0060.08215.14
5.5.150.0040.08615.16
5.5.140.0080.10115.06
5.5.130.0060.10115.18
5.5.120.0060.09915.16
5.5.110.0070.07315.15
5.5.100.0090.09115.11
5.5.90.0070.09715.25
5.5.80.0070.09915.03
5.5.70.0010.10914.99
5.5.60.0070.07915.16
5.5.50.0030.09815.08
5.5.40.0020.10515.13
5.5.30.0040.10514.92
5.5.20.0040.09815.11
5.5.10.0040.10215.01
5.5.00.0070.09714.91
5.4.450.0010.10013.83
5.4.440.0020.07713.69
5.4.430.0040.10413.83
5.4.420.0040.09813.94
5.4.410.0070.08013.91
5.4.400.0060.07713.71
5.4.390.0030.09513.56
5.4.380.0030.09613.65
5.4.370.0070.10213.74
5.4.360.0010.07713.74
5.4.350.0040.08213.71
5.4.340.0030.09513.66
5.4.330.0050.07011.01
5.4.320.0040.09713.73
5.4.310.0030.09813.57
5.4.300.0100.09713.71
5.4.290.0050.09913.70
5.4.280.0040.09513.74
5.4.270.0020.08013.66
5.4.260.0060.09713.78
5.4.250.0060.10313.67
5.4.240.0070.08513.74
5.4.230.0090.10413.84
5.4.220.0030.08313.65
5.4.210.0050.07913.53
5.4.200.0020.10413.77
5.4.190.0060.08013.73
5.4.180.0080.09213.72
5.4.170.0080.10213.51
5.4.160.0040.08013.72
5.4.150.0030.07813.57
5.4.140.0070.11112.87
5.4.130.0060.09812.84
5.4.120.0040.09912.85
5.4.110.0020.08012.67
5.4.100.0070.09412.88
5.4.90.0100.09212.68
5.4.80.0090.09012.83
5.4.70.0070.08412.77
5.4.60.0020.09912.83
5.4.50.0060.10112.73
5.4.40.0040.10512.85
5.4.30.0070.09712.76
5.4.20.0040.09312.70
5.4.10.0030.09412.76
5.4.00.0040.07712.52
5.3.290.0070.08612.06
5.3.280.0060.10111.90
5.3.270.0060.08011.99
5.3.260.0030.09611.86
5.3.250.0080.08811.91
5.3.240.0070.09111.83
5.3.230.0060.08411.78
5.3.220.0030.08011.82
5.3.210.0090.10111.85
5.3.200.0030.08611.81
5.3.190.0030.10011.82
5.3.180.0040.09611.88
5.3.170.0060.09511.95
5.3.160.0040.09811.84
5.3.150.0040.09611.91
5.3.140.0030.10211.90
5.3.130.0020.08011.79
5.3.120.0050.08211.85
5.3.110.0060.08411.80
5.3.100.0090.09611.73
5.3.90.0040.07811.67
5.3.80.0060.07711.58
5.3.70.0030.09011.65
5.3.60.0030.09911.60
5.3.50.0030.09011.71
5.3.40.0030.09811.67
5.3.30.0060.08911.65
5.3.20.0030.10211.64
5.3.10.0020.09711.40
5.3.00.0000.08511.34
5.2.170.0030.02811.61
5.2.160.0050.02311.51
5.2.150.0090.03011.63
5.2.140.0030.01811.55
5.2.130.0050.03411.47
5.2.120.0060.02511.57
5.2.110.0050.03511.55
5.2.100.0060.02811.46
5.2.90.0030.03511.58
5.2.80.0030.03011.47
5.2.70.0030.03811.46
5.2.60.0150.01811.54
5.2.50.0030.01711.54
5.2.40.0020.03111.46
5.2.30.0020.02111.49
5.2.20.0050.01511.48
5.2.10.0030.01711.46
5.2.00.0050.03211.46
5.1.60.0090.01211.46
5.1.50.0030.02911.46
5.1.40.0030.01811.46
5.1.30.0030.02611.46
5.1.20.0050.02011.46
5.1.10.0080.02811.46
5.1.00.0040.02111.46
5.0.50.0050.01811.46
5.0.40.0040.01811.46
5.0.30.0050.03311.46
5.0.20.0040.01111.46
5.0.10.0020.02011.46
5.0.00.0040.01911.46
4.4.90.0020.02011.46
4.4.80.0030.01911.46
4.4.70.0030.01811.46
4.4.60.0060.01811.46
4.4.50.0020.01511.46
4.4.40.0020.03011.46
4.4.30.0000.01711.46
4.4.20.0000.01311.46
4.4.10.0020.01711.46
4.4.00.0070.02411.46
4.3.110.0070.01511.46
4.3.100.0050.01711.46
4.3.90.0000.02211.46
4.3.80.0020.03011.46
4.3.70.0040.01411.46
4.3.60.0020.02211.46
4.3.50.0010.01811.46
4.3.40.0050.02711.46
4.3.30.0020.02311.46
4.3.20.0000.02211.46
4.3.10.0030.01711.46
4.3.00.0000.02211.46

preferences:
34.38 ms | 400 KiB | 5 Q