3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pass_crypt($password, $unique_salt) { return crypt($password, '$2a$10$'.$unique_salt); } function pass_salt() { return substr(sha1(mt_rand()),0,22); } function pass_encrypt($hash, $password) { $full_salt = substr($hash, 0, 29); $new_hash = crypt($password, $full_salt); // returns true or false return ($hash === $new_hash); } echo pass_crypt('e1d0b743ce230a5d3bfffa678848ecc8e79ad09d', pass_salt());

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.0100.07114.81
7.3.120.0150.06814.86
7.3.110.0080.07214.96
7.3.100.0070.07114.70
7.3.90.0120.06214.74
7.3.80.0030.07214.99
7.3.70.0080.06514.76
7.3.60.0030.07014.60
7.3.50.0070.06814.76
7.3.40.0030.06814.73
7.3.30.0070.06714.81
7.3.20.0070.07016.66
7.3.10.0020.07016.63
7.3.00.0060.06616.69
7.2.250.0070.07615.12
7.2.240.0050.07514.94
7.2.230.0050.07114.88
7.2.220.0020.07314.80
7.2.210.0080.06414.96
7.2.200.0070.06914.90
7.2.190.0080.06814.93
7.2.180.0020.07015.09
7.2.170.0100.06515.12
7.2.130.0030.07316.82
7.2.120.0070.06916.98
7.2.110.0030.06516.90
7.2.100.0070.07116.87
7.2.90.0070.07016.93
7.2.80.0130.06316.87
7.2.70.0070.06616.70
7.2.60.0100.06516.95
7.2.50.0070.06716.73
7.2.40.0070.06916.96
7.2.30.0070.06916.63
7.2.20.0070.06916.91
7.2.10.0100.06616.93
7.2.00.0070.06818.05
7.1.330.0050.06715.88
7.1.320.0030.07015.78
7.1.310.0020.07315.67
7.1.300.0080.06515.63
7.1.290.0000.07615.88
7.1.280.0050.06615.57
7.1.270.0030.07115.48
7.1.260.0070.07215.76
7.1.250.0030.07215.80
7.1.70.0070.06117.31
7.1.60.0070.12419.46
7.1.50.0140.11217.07
7.1.00.0030.16022.28
7.0.200.0070.06316.88
7.0.140.0130.15022.12
7.0.60.0330.14019.95
7.0.50.0070.16017.87
7.0.40.0100.16720.09
7.0.30.0300.14020.19
7.0.20.0330.12320.10
7.0.10.0070.16320.15
7.0.00.0170.13320.18
5.6.280.0070.17021.12
5.6.210.0000.16320.73
5.6.200.0000.16018.18
5.6.190.0100.16320.55
5.6.180.0100.14320.48
5.6.170.0330.10720.44
5.6.160.0030.10720.46
5.6.150.0030.11718.23
5.6.140.0130.15318.32
5.6.130.0100.16718.22
5.6.120.0070.15320.98
5.6.110.0070.17021.04
5.6.100.0030.14721.14
5.6.90.0070.15721.19
5.6.80.0130.13720.38
5.5.350.0130.15320.41
5.5.340.0130.16017.96
5.5.330.0000.11320.38
5.5.320.0270.15020.27
5.5.310.0470.12720.30
5.5.300.0070.14017.96
5.5.290.0030.12717.95
5.5.280.0100.16720.88
5.5.270.0130.16320.87
5.5.260.0070.16020.84
5.5.250.0130.14320.66
5.5.240.0270.13320.00
5.4.450.0070.15019.61
5.4.440.0130.13719.59
5.4.430.0030.14019.73
5.4.420.0230.13719.58
5.4.410.0270.12719.07
5.4.400.0170.13019.27
5.4.390.0130.13319.29
5.4.380.0130.15018.57
5.4.370.0200.14318.79
5.4.360.0100.13318.77
5.4.350.0100.13718.54
5.4.340.0200.12718.54
5.4.320.0070.11812.50
5.4.310.0060.09712.50
5.4.300.0070.09512.51
5.4.290.0130.18512.50
5.4.280.0120.13912.40
5.4.270.0140.19212.40
5.4.260.0100.18512.40
5.4.250.0080.12312.40
5.4.240.0080.13512.40
5.4.230.0130.17512.39
5.4.220.0180.15112.39
5.4.210.0110.12412.39
5.4.200.0170.16612.39
5.4.190.0100.16412.39
5.4.180.0110.13412.39
5.4.170.0120.12812.39
5.4.160.0150.18412.39
5.4.150.0110.13012.39
5.4.140.0160.15112.07
5.4.130.0090.14612.06
5.4.120.0050.11912.02
5.4.110.0070.10212.01
5.4.100.0120.14612.01
5.4.90.0060.12012.02
5.4.80.0120.12812.01
5.4.70.0120.13912.00
5.4.60.0120.16612.01
5.4.50.0120.18512.01
5.4.40.0120.17112.00
5.4.30.0080.11411.99
5.4.20.0150.16812.00
5.4.10.0110.17811.99
5.4.00.0100.11811.48
5.3.290.0050.09812.80
5.3.280.0170.14612.71
5.3.270.0130.12512.73
5.3.260.0080.14012.72
5.3.250.0090.15212.72
5.3.240.0070.15812.72
5.3.230.0130.20312.71
5.3.220.0100.12112.68
5.3.210.0210.15612.68
5.3.200.0070.12212.68
5.3.190.0080.12012.68
5.3.180.0080.10212.67
5.3.170.0080.09812.66
5.3.160.0030.10512.67
5.3.150.0060.11612.68
5.3.140.0090.10612.66
5.3.130.0090.12412.66
5.3.120.0140.13512.66
5.3.110.0130.13212.66
5.3.100.0090.11412.13
5.3.90.0140.10912.11
5.3.80.0050.11212.11
5.3.70.0120.11212.11
5.3.60.0110.13312.09
5.3.50.0070.11312.04
5.3.40.0090.11212.04
5.3.30.0040.10011.99
5.3.20.0030.09811.77
5.3.10.0080.10011.74
5.3.00.0090.09711.73
5.2.170.0050.0339.38
5.2.160.0070.0279.37
5.2.150.0080.0299.38
5.2.140.0060.0309.37
5.2.130.0060.0309.33
5.2.120.0070.0349.33
5.2.110.0070.0399.32
5.2.100.0030.0339.32
5.2.90.0070.0329.32
5.2.80.0080.0339.31
5.2.70.0090.0269.31
5.2.60.0080.0289.28
5.2.50.0050.0309.25
5.2.40.0090.0299.22
5.2.30.0080.0289.19
5.2.20.0060.0319.18
5.2.10.0070.0359.09
5.2.00.0040.0318.95
5.1.60.0050.0258.24
5.1.50.0030.0268.23
5.1.40.0010.0298.21
5.1.30.0050.0378.56
5.1.20.0050.0388.57
5.1.10.0100.0338.31
5.1.00.0040.0398.31
5.0.50.0040.0236.78
5.0.40.0070.0256.65
5.0.30.0040.0426.45
5.0.20.0070.0246.43
5.0.10.0040.0356.40
5.0.00.0070.0436.39
4.4.90.0030.0264.82
4.4.80.0080.0354.80
4.4.70.0070.0204.80
4.4.60.0060.0214.81
4.4.50.0060.0204.82
4.4.40.0070.0344.82
4.4.30.0070.0194.81
4.4.20.0070.0204.88
4.4.10.0050.0224.88
4.4.00.0030.0264.84
4.3.110.0040.0164.75
4.3.100.0040.0164.74
4.3.90.0040.0154.72
4.3.80.0040.0264.72
4.3.70.0080.0264.72
4.3.60.0040.0144.72
4.3.50.0030.0244.71
4.3.40.0050.0284.67
4.3.30.0040.0213.48
4.3.20.0000.0243.45
4.3.10.0030.0213.42
4.3.00.0070.0208.25

preferences:
45.14 ms | 401 KiB | 5 Q