3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sSecretKey = 'TrueID2015tRUEid'; $json = json_encode($input); $encrypt = fnEncrypt($json, $sSecretKey); function fnEncrypt($sValue, $sSecretKey) { $iv = base64_decode('Jc8EZ9nZPbWZEoV4ad8/CQ=='); $sValue = pkcs5_pad($sValue, mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC)); $sValue = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $sSecretKey, $sValue, MCRYPT_MODE_CBC, $iv); $sValue = base64_encode($sValue); return $sValue; } function pkcs5_pad($text, $blocksize) { $pad = $blocksize - (strlen($text) % $blocksize); $pad2 = $text . str_repeat(chr($pad), $pad); return $pad2; }

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)
8.3.60.0090.00616.63
8.3.50.0130.01018.18
8.3.40.0110.00418.80
8.3.30.0140.00018.84
8.3.20.0000.00720.34
8.3.10.0080.00021.85
8.3.00.0040.00419.50
8.2.180.0100.01016.63
8.2.170.0140.00022.96
8.2.160.0130.00722.25
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0100.00017.50
8.2.120.0050.00326.35
8.2.110.0060.00321.01
8.2.100.0110.00017.80
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0080.00017.60
8.2.60.0050.00317.80
8.2.50.0040.00418.07
8.2.40.0070.00419.28
8.2.30.0080.00020.63
8.2.20.0060.00317.63
8.2.10.0080.00017.97
8.2.00.0040.00418.05
8.1.280.0120.00425.92
8.1.270.0030.00622.13
8.1.260.0020.00528.09
8.1.250.0040.00428.09
8.1.240.0060.00319.44
8.1.230.0080.00417.53
8.1.220.0040.00417.79
8.1.210.0000.00918.77
8.1.200.0030.00617.22
8.1.190.0000.00817.35
8.1.180.0080.00018.10
8.1.170.0000.01118.53
8.1.160.0070.00422.00
8.1.150.0040.00418.87
8.1.140.0070.00019.44
8.1.130.0030.00317.71
8.1.120.0000.00717.49
8.1.110.0040.00417.33
8.1.100.0020.00517.41
8.1.90.0000.00817.40
8.1.80.0000.00917.36
8.1.70.0030.00617.37
8.1.60.0030.00617.56
8.1.50.0000.00817.53
8.1.40.0000.00717.54
8.1.30.0040.00817.69
8.1.20.0000.01117.66
8.1.10.0040.00417.60
8.1.00.0110.00017.59
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.26
8.0.270.0070.00017.11
8.0.260.0030.00317.08
8.0.250.0050.00316.95
8.0.240.0040.00416.95
8.0.230.0000.00716.92
8.0.220.0030.00316.80
8.0.210.0070.00016.77
8.0.200.0000.00616.93
8.0.190.0040.00417.00
8.0.180.0040.00416.99
8.0.170.0080.00016.99
8.0.160.0080.00016.85
8.0.150.0040.00416.73
8.0.140.0030.00616.87
8.0.130.0070.00013.28
8.0.120.0000.00816.78
8.0.110.0000.00716.91
8.0.100.0040.00416.73
8.0.90.0000.00716.93
8.0.80.0040.01116.88
8.0.70.0050.00516.75
8.0.60.0030.00516.76
8.0.50.0050.00216.79
8.0.30.0080.01017.17
8.0.20.0080.01217.40
8.0.10.0040.00416.82
8.0.00.0100.01016.98
7.4.330.0020.00216.70
7.4.320.0030.00316.47
7.4.300.0040.00416.54
7.4.290.0040.00416.50
7.4.280.0040.00416.64
7.4.270.0000.00616.41
7.4.260.0070.00016.63
7.4.250.0030.00516.57
7.4.240.0010.00616.61
7.4.230.0070.00016.61
7.4.220.0130.00616.64
7.4.210.0060.00816.58
7.4.200.0040.00416.51
7.4.160.0090.00616.46
7.4.150.0180.00617.40
7.4.140.0090.01017.86
7.4.130.0060.01216.53
7.4.120.0110.00916.47
7.4.110.0100.00716.31
7.4.100.0100.00716.28
7.4.90.0110.00716.46
7.4.80.0030.01419.39
7.4.70.0090.01316.50
7.4.60.0060.00916.42
7.4.50.0070.00416.40
7.4.40.0130.00316.35
7.4.30.0090.00916.66
7.4.00.0040.01014.91
7.3.330.0070.00013.33
7.3.320.0030.00313.38
7.3.310.0030.00316.20
7.3.300.0000.00716.14
7.3.290.0080.00816.26
7.3.280.0090.01016.25
7.3.270.0170.00017.40
7.3.260.0120.00616.52
7.3.250.0100.00916.42
7.3.240.0130.00616.53
7.3.230.0090.00916.39
7.3.210.0190.00316.40
7.3.200.0170.00516.45
7.3.190.0120.00616.42
7.3.180.0140.00316.50
7.3.170.0170.00316.27
7.3.160.0090.00616.49
7.3.10.0030.00616.63
7.3.00.0070.00616.82
7.2.330.0140.00716.59
7.2.320.0120.00616.63
7.2.310.0120.00416.45
7.2.300.0100.00716.59
7.2.290.0120.00816.81
7.2.130.0080.00417.02
7.2.120.0060.00916.63
7.2.110.0000.01416.87
7.2.100.0040.00716.60
7.2.90.0090.00316.95
7.2.80.0060.00617.00
7.2.70.0030.00616.86
7.2.60.0050.00816.77
7.2.50.0040.01116.84
7.2.40.0100.00716.91
7.2.30.0030.01316.76
7.2.20.0060.00916.96
7.2.10.0100.00616.91
7.2.00.0030.01118.22
7.1.250.0110.00415.56
7.1.200.0000.01015.73
7.1.100.0040.01117.92
7.1.70.0030.00617.10
7.1.60.0160.00619.48
7.1.50.0070.01616.90
7.1.00.0030.07722.30
7.0.200.0430.00314.39
7.0.90.0130.04719.90
7.0.80.0100.07319.91
7.0.70.0500.07319.89
7.0.60.0500.08019.89
7.0.50.0530.05320.28
7.0.40.0100.07020.12
7.0.30.0070.09020.22
7.0.20.0130.05320.18
7.0.10.0070.04720.13
7.0.00.0070.06720.07
5.6.280.0030.03020.99
5.6.240.0100.05720.60
5.6.230.0100.05020.69
5.6.220.0070.04020.62
5.6.210.0030.04320.70
5.6.200.0070.08021.19
5.6.190.0100.08021.11
5.6.180.0070.05021.18
5.6.170.0000.08721.13
5.6.160.0070.08021.08
5.6.150.0070.06721.04
5.6.140.0030.07721.05
5.6.130.0070.08021.15
5.6.120.0130.07721.21
5.6.110.0000.05321.12
5.6.100.0070.08321.04
5.6.90.0070.04720.96
5.6.80.0170.05720.54
5.6.70.0070.08720.45
5.6.60.0130.07320.41
5.6.50.0070.08020.45
5.6.40.0070.04020.41
5.6.30.0070.05320.52
5.6.20.0130.07020.43
5.6.10.0030.06320.43
5.6.00.0100.05020.37
5.5.380.0070.04720.41
5.5.370.0170.06320.46
5.5.360.0070.08720.34
5.5.350.0100.07720.38
5.5.340.0130.07720.89
5.5.330.0000.09020.85
5.5.320.0100.04320.84
5.5.310.0030.05720.92
5.5.300.0170.07320.87
5.5.290.0100.07320.84
5.5.280.0100.08020.92
5.5.270.0170.06720.95
5.5.260.0030.05320.98
5.5.250.0070.08720.80
5.5.240.0070.07720.04
5.5.230.0070.06020.23
5.5.220.0070.08320.34
5.5.210.0030.07720.36
5.5.200.0100.06720.23
5.5.190.0070.07320.24
5.5.180.0130.08020.19
5.5.160.0170.03720.16
5.5.150.0170.06720.25
5.5.140.0070.05720.23
5.5.130.0000.06720.23
5.5.120.0070.07320.29
5.5.110.0100.07320.27
5.5.100.0130.07320.13
5.5.90.0000.08320.08
5.5.80.0070.05020.18
5.5.70.0130.07320.14
5.5.60.0130.04020.07
5.5.50.0170.06720.19
5.5.40.0030.07720.11
5.5.30.0130.07020.10
5.5.20.0100.07020.06
5.5.10.0000.07720.16
5.5.00.0000.08720.16

preferences:
49.35 ms | 400 KiB | 5 Q