3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encrypt($plain) { $plain = md5($plain); $V = md5('??????'); //var_dump($V); $rnd = md5(substr(microtime(),11));// hao miao //var_dump(substr(microtime(),11)+mt_rand(0,35)); $cipher = ''; for($i = 0; $i < strlen($plain); $i++) { //32ci $cipher .= ($plain[$i] ^ $rnd[$i]); echo $cipher; } $cipher .= $rnd; echo $cipher; $V .= strrev($V); echo $V; //var_dump($cipher); for($i = 0; $i < strlen($V); $i++) { $cipher[$i] = ($cipher[$i] ^ $V[$i]); } //var_dump($cipher); //var_dump($V); return str_replace('=', '', base64_encode($cipher)); } encrypt('sb') ?>

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.10.0100.00715.00
7.4.00.0080.00914.85
7.3.130.0070.01015.03
7.3.120.0060.00814.70
7.3.110.0040.01314.85
7.3.100.0050.01214.67
7.3.90.0040.01014.81
7.3.80.0080.00314.78
7.3.70.0060.00614.74
7.3.60.0060.00914.62
7.3.50.0070.00814.68
7.3.40.0080.00614.71
7.3.30.0040.01014.73
7.3.20.0040.00816.59
7.3.10.0060.00816.61
7.3.00.0030.01016.45
7.2.260.0070.00715.02
7.2.250.0080.00814.93
7.2.240.0080.01015.07
7.2.230.0070.00815.02
7.2.220.0060.00915.02
7.2.210.0060.00815.09
7.2.200.0100.00615.05
7.2.190.0080.00714.99
7.2.180.0040.00914.95
7.2.170.0040.01114.96
7.2.160.0040.00815.08
7.2.150.0070.00817.01
7.2.140.0070.00716.91
7.2.130.0070.00516.85
7.2.120.0080.00616.98
7.2.110.0080.00316.79
7.2.100.0030.01016.99
7.2.90.0080.00717.00
7.2.80.0020.01216.76
7.2.70.0030.01116.82
7.2.60.0060.00817.00
7.2.50.0090.00717.03
7.2.40.0040.00916.91
7.2.30.0050.00716.91
7.2.20.0050.01117.00
7.2.10.0090.00616.91
7.2.00.0080.00316.96
7.1.330.0040.00915.90
7.1.320.0060.00915.78
7.1.310.0050.00615.64
7.1.300.0090.00815.74
7.1.290.0030.00815.88
7.1.280.0050.00615.69
7.1.270.0070.00615.80
7.1.260.0040.00915.87
7.1.250.0070.00515.69
7.1.240.0080.00515.70
7.1.230.0080.00515.81
7.1.220.0060.00515.72
7.1.210.0090.00315.87
7.1.200.0100.00315.88
7.1.190.0060.00715.70
7.1.180.0070.00815.75
7.1.170.0010.01215.75
7.1.160.0100.00315.79
7.1.150.0090.00315.72
7.1.140.0080.00815.96
7.1.130.0040.00815.88
7.1.120.0050.01015.70
7.1.110.0050.01015.71
7.1.100.0030.00715.69
7.1.90.0070.00815.93
7.1.80.0070.00815.75
7.1.70.0040.00716.27
7.1.60.0060.00716.99
7.1.50.0060.00516.25
7.1.40.0100.00315.68
7.1.30.0020.01415.77
7.1.20.0010.01015.76
7.1.10.0050.01115.79
7.1.00.0070.02818.01
7.0.330.0060.00515.33
7.0.320.0020.00715.48
7.0.310.0060.00615.52
7.0.300.0050.00815.43
7.0.290.0060.00815.47
7.0.280.0050.00715.45
7.0.270.0010.01015.36
7.0.260.0040.00815.34
7.0.250.0070.00415.50
7.0.240.0050.00415.44
7.0.230.0070.00415.45
7.0.220.0070.00415.49
7.0.210.0090.00515.43
7.0.200.0030.00715.85
7.0.190.0050.00815.52
7.0.180.0060.00815.52
7.0.170.0070.00615.49
7.0.160.0030.01215.36
7.0.150.0060.00915.30
7.0.140.0050.02317.65
7.0.130.0060.00415.35
7.0.120.0060.00615.58
7.0.110.0060.00515.34
7.0.100.0060.00615.42
7.0.90.0060.00615.37
7.0.80.0100.00415.34
7.0.70.0050.00815.25
7.0.60.0090.02516.96
7.0.50.0080.01516.16
7.0.40.0090.02915.75
7.0.30.0170.02615.76
7.0.20.0140.01715.72
7.0.10.0060.03115.76
7.0.00.0040.01915.70
5.6.400.0060.00614.57
5.6.390.0000.01214.36
5.6.380.0030.01014.50
5.6.370.0080.00514.58
5.6.360.0050.00614.41
5.6.350.0050.00914.46
5.6.340.0080.00614.67
5.6.330.0020.00914.55
5.6.320.0070.00714.34
5.6.310.0050.01014.13
5.6.300.0090.00614.48
5.6.290.0060.00814.56
5.6.280.0040.02116.68
5.6.270.0050.01114.54
5.6.260.0070.00614.22
5.6.250.0040.01114.48
5.6.240.0080.00514.38
5.6.230.0070.00714.47
5.6.220.0050.00814.53
5.6.210.0040.03416.46
5.6.200.0070.03315.78
5.6.190.0070.03316.51
5.6.180.0170.02716.56
5.6.170.0160.02216.46
5.6.160.0050.02416.45
5.6.150.0030.02315.61
5.6.140.0090.02615.65
5.6.130.0090.02715.76
5.6.120.0040.02516.58
5.6.110.0090.03016.67
5.6.100.0080.03216.53
5.6.90.0070.02916.69
5.6.80.0070.03416.34
5.6.70.0020.01114.14
5.6.60.0020.00914.40
5.6.50.0040.00814.29
5.6.40.0060.00514.35
5.6.30.0080.00414.16
5.6.20.0050.00814.32
5.6.10.0050.00814.55
5.6.00.0020.01314.15
5.5.380.0090.00714.29
5.5.370.0020.01114.47
5.5.360.0070.01014.39
5.5.350.1400.02216.46
5.5.340.0090.02515.39
5.5.330.0060.03116.33
5.5.320.0140.02416.21
5.5.310.0110.02416.38
5.5.300.0050.03415.64
5.5.290.0030.02615.35
5.5.280.0070.03116.50
5.5.270.0050.03616.63
5.5.260.0100.02716.49
5.5.250.0050.03316.28
5.5.240.0100.02316.13
5.5.230.0050.01214.13
5.5.220.0100.00314.43
5.5.210.0050.01014.32
5.5.200.0070.00714.46
5.5.190.0060.01014.32
5.5.180.0070.00914.53
5.5.170.0080.00714.45
5.5.160.0080.00714.19
5.5.150.0100.00214.05
5.5.140.0040.00714.45
5.5.130.0070.01014.51
5.5.120.0080.00614.44
5.5.110.0030.01014.31
5.5.100.0060.00914.26
5.5.90.0100.00214.27
5.5.80.0040.00614.33
5.5.70.0040.01214.16
5.5.60.0050.00914.25
5.5.50.0070.00314.32
5.5.40.0000.01114.40
5.5.30.0030.01014.03
5.5.20.0010.00714.37
5.5.10.0080.00614.33
5.5.00.0040.00814.34
5.4.450.0260.01913.91
5.4.440.0230.02714.08
5.4.430.0130.02214.10
5.4.420.0210.02414.02
5.4.410.0260.02213.89
5.4.400.0040.02513.82
5.4.390.0110.02413.56
5.4.380.0140.02413.69
5.4.370.0110.03113.58
5.4.360.0090.02613.66
5.4.350.0140.02113.81
5.4.340.0110.02513.88
5.4.330.0030.00611.07
5.4.320.0110.02113.63
5.4.310.0130.01713.70
5.4.300.0100.02313.57
5.4.290.0130.01913.56
5.4.280.0130.01913.65
5.4.270.0080.02113.51
5.4.260.0130.01913.62
5.4.250.0070.02513.61
5.4.240.0140.01813.75
5.4.230.0070.02413.70
5.4.220.0140.01813.68
5.4.210.0080.02213.38
5.4.200.0090.01812.95
5.4.190.0110.02213.57
5.4.180.0130.02113.66
5.4.170.0090.02013.63
5.4.160.0080.02113.59
5.4.150.0100.02013.67
5.4.140.0070.02212.69
5.4.130.0090.02012.98
5.4.120.0130.01813.02
5.4.110.0140.01612.99
5.4.100.0140.01812.98
5.4.90.0130.02312.79
5.4.80.0090.02812.86
5.4.70.0100.02012.83
5.4.60.0110.02112.94
5.4.50.0140.01512.94
5.4.40.0080.02312.92
5.4.30.0030.02612.84
5.4.20.0080.02512.94
5.4.10.0130.01712.79
5.4.00.0110.01912.54
5.3.290.0130.06014.72
5.3.280.0130.06314.73
5.3.270.0170.06314.64
5.3.260.0200.05314.81
5.3.250.0230.04714.82
5.3.240.0100.06014.59
5.3.230.0130.06014.63
5.3.220.0230.05714.75
5.3.210.0130.06314.67
5.3.200.0100.06314.70
5.3.190.0230.05314.62
5.3.180.0300.05714.66
5.3.170.0270.05014.66
5.3.160.0200.05314.70
5.3.150.0170.05314.56
5.3.140.0170.05014.55
5.3.130.0230.05014.68
5.3.120.0230.04714.60
5.3.110.0100.06014.75
5.3.100.0300.04314.15
5.3.90.0170.05714.15
5.3.80.0070.06014.14
5.3.70.0200.04714.05
5.3.60.0070.06314.04
5.3.50.0230.04313.98
5.3.40.0200.04714.07
5.3.30.0170.05014.07
5.3.20.0270.04013.72
5.3.10.0100.05713.69
5.3.00.0230.05313.66
5.2.170.0170.04011.19
5.2.160.0070.05011.19
5.2.150.0130.04311.18
5.2.140.0170.04011.19
5.2.130.0070.04711.14
5.2.120.0170.03311.22
5.2.110.0130.04011.14
5.2.100.0170.04311.32
5.2.90.0030.05011.10
5.2.80.0070.05011.20
5.2.70.0130.04311.09
5.2.60.0070.05011.18
5.2.50.0230.03311.09
5.2.40.0200.03311.07
5.2.30.0070.04311.01
5.2.20.0130.03710.98
5.2.10.0100.04710.96
5.2.00.0170.05010.94
5.1.60.0100.04310.03
5.1.50.0100.03710.12
5.1.40.0070.03710.08
5.1.30.0130.03710.35
5.1.20.0130.04010.45
5.1.10.0230.03310.16
5.1.00.0130.03710.25
5.0.50.0100.0278.66
5.0.40.0100.0238.42
5.0.30.0100.0408.31
5.0.20.0100.0238.33
5.0.10.0030.0308.37
5.0.00.0070.0438.21
4.4.90.0070.0236.02
4.4.80.0030.0235.93
4.4.70.0100.0176.00
4.4.60.0000.0275.96
4.4.50.0070.0205.98
4.4.40.0000.0405.96
4.4.30.0100.0206.00
4.4.20.0070.0235.99
4.4.10.0170.0135.95
4.4.00.0070.0375.93
4.3.110.0100.0205.97
4.3.100.0030.0235.85
4.3.90.0000.0305.89
4.3.80.0030.0375.84
4.3.70.0030.0235.79
4.3.60.0130.0135.79
4.3.50.0100.0275.94
4.3.40.0030.0405.78
4.3.30.0030.0234.59
4.3.20.0100.0174.68
4.3.10.0070.0204.53
4.3.00.0070.0237.15

preferences:
38.2 ms | 402 KiB | 5 Q