3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sSecretKey = 'TrueID2015tRUEid'; $json = json_encode(array( "trueid" => "0864073341", "ssoid" => "19041211", "access_token" => "171|1.c31e0e8fe71d8215f1ff95__3600.1442364865- 19041211|7c938d42413cbdcf23500388375", "thaiid" => "5101599032198", "channel" => "trueid", "paytype" => "credit", "total" => "1010.87", "lang" => "th", "payment" => array( "count" => "2", "invoicelist" => array( array( "invoice_number" => "0001392172791881", "invoice_amount" => "320.47", "amount" => "320.47", "company_code" => "RM", "service_number" => "0864073341", "ban_number" => "16652487", "due_date" => "18/10/2015", "bill_month" => "102015" ), array( "invoice_number" => "000139217279xxxx", "invoice_amount" => "660.93", "amount" => "660.93", "company_code" => "AC", "service_number" => "NF0095630I", "ban_number" => "150024746305", "due_date" => "20/10/2015", "bill_month" => "102015" ) ) ) )); $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.70.0120.00618.43
8.3.60.0120.00316.75
8.3.50.0130.00821.97
8.3.40.0070.00718.92
8.3.30.0040.01118.85
8.3.20.0080.00020.34
8.3.10.0040.00421.76
8.3.00.0050.00319.38
8.2.190.0110.00418.79
8.2.180.0150.00417.00
8.2.170.0070.00722.96
8.2.160.0100.00322.16
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00917.63
8.2.120.0040.00426.35
8.2.110.0040.00822.05
8.2.100.0110.00017.93
8.2.90.0000.00819.07
8.2.80.0000.01017.97
8.2.70.0100.00017.63
8.2.60.0000.00817.92
8.2.50.0050.00318.07
8.2.40.0030.00719.11
8.2.30.0040.00420.56
8.2.20.0050.00517.75
8.2.10.0000.00718.19
8.2.00.0050.00318.07
8.1.280.0030.01425.92
8.1.270.0090.00022.02
8.1.260.0070.00028.09
8.1.250.0050.00328.09
8.1.240.0000.00922.48
8.1.230.0120.00017.65
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0040.00417.00
8.1.180.0060.00318.10
8.1.170.0030.00618.51
8.1.160.0090.00521.96
8.1.150.0070.00018.85
8.1.140.0050.00319.45
8.1.130.0030.00317.57
8.1.120.0040.00417.46
8.1.110.0000.00817.42
8.1.100.0000.00717.30
8.1.90.0030.00517.34
8.1.80.0040.00417.43
8.1.70.0080.00017.42
8.1.60.0090.00017.64
8.1.50.0030.00617.57
8.1.40.0060.00317.55
8.1.30.0040.00817.59
8.1.20.0070.00417.70
8.1.10.0000.00717.48
8.1.00.0080.00217.52
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.41
8.0.270.0030.00317.20
8.0.260.0030.00317.11
8.0.250.0070.00016.97
8.0.240.0030.00616.97
8.0.230.0000.00717.03
8.0.220.0070.00016.91
8.0.210.0040.00416.88
8.0.200.0070.00016.96
8.0.190.0080.00017.03
8.0.180.0040.00416.82
8.0.170.0050.00316.78
8.0.160.0000.00816.90
8.0.150.0040.00416.88
8.0.140.0020.00516.81
8.0.130.0060.00013.33
8.0.120.0000.00816.85
8.0.110.0080.00016.95
8.0.100.0000.00716.79
8.0.90.0070.00016.92
8.0.80.0060.00916.88
8.0.70.0030.00516.89
8.0.60.0000.00916.73
8.0.50.0000.00816.77
8.0.30.0140.00317.08
8.0.20.0080.01117.40
8.0.10.0050.00317.09
8.0.00.0130.00516.88
7.4.330.0030.00316.66
7.4.320.0060.00016.58
7.4.300.0040.00416.67
7.4.290.0030.00316.58
7.4.280.0040.00416.56
7.4.270.0030.00316.63
7.4.260.0030.00316.49
7.4.250.0070.00016.58
7.4.240.0040.00316.48
7.4.230.0050.00316.59
7.4.220.0180.00616.57
7.4.210.0090.00916.54
7.4.200.0070.00016.59
7.4.160.0040.01416.68
7.4.150.0110.00617.40
7.4.140.0170.00417.86
7.4.130.0100.01016.49
7.4.120.0150.00416.47
7.4.110.0100.00716.30
7.4.100.0130.01016.69
7.4.90.0140.00316.55
7.4.80.0100.01019.39
7.4.70.0060.01516.63
7.4.60.0030.01316.40
7.4.50.0060.00916.37
7.4.40.0040.01116.47
7.4.30.0100.00716.44
7.4.00.0060.00914.93
7.3.330.0060.00013.34
7.3.320.0050.00013.09
7.3.310.0030.00516.29
7.3.300.0030.00316.23
7.3.290.0040.00416.20
7.3.280.0140.00616.33
7.3.270.0070.01017.40
7.3.260.0060.01116.35
7.3.250.0060.01316.43
7.3.240.0120.01016.34
7.3.230.0140.00316.39
7.3.210.0130.00316.29
7.3.200.0100.00616.39
7.3.190.0130.00316.48
7.3.180.0060.01016.50
7.3.170.0070.01316.51
7.3.160.0030.01216.27
7.3.120.0040.01414.94
7.3.110.0020.01614.91
7.3.100.0110.00514.63
7.3.90.0050.00914.68
7.3.80.0070.00514.87
7.3.70.0050.00914.56
7.3.60.0020.01214.67
7.3.50.0090.00414.72
7.3.40.0100.00314.61
7.3.30.0050.01214.85
7.3.20.0040.00916.63
7.3.10.0080.00516.59
7.3.00.0090.00316.51
7.2.330.0140.00316.64
7.2.320.0090.01216.46
7.2.310.0100.00616.66
7.2.300.0130.00316.72
7.2.290.0120.00616.57
7.2.250.0070.01215.16
7.2.240.0040.01614.81
7.2.230.0060.00814.97
7.2.220.0070.01114.74
7.2.210.0090.00615.07
7.2.200.0000.01014.76
7.2.190.0020.01215.01
7.2.180.0070.00714.72
7.2.170.0080.00615.02
7.2.60.0070.00716.96
7.2.00.0060.00619.16
7.1.330.0060.00815.87
7.1.320.0010.00815.77
7.1.310.0030.01015.56
7.1.300.0080.00815.71
7.1.290.0020.01415.75
7.1.280.0030.01115.60
7.1.270.0060.00915.76
7.1.260.0030.00915.67
7.1.200.0030.00715.80
7.1.100.0070.00718.02
7.1.70.0060.00917.21
7.1.60.0100.01419.48
7.1.50.0180.00716.95
7.1.00.0100.07022.54
7.0.200.0380.01014.34
7.0.90.0030.08319.92
7.0.80.0130.07320.00
7.0.70.0070.06019.96
7.0.60.0100.06319.95
7.0.50.0100.08020.22
7.0.40.0070.05720.22
7.0.30.0100.05720.14
7.0.20.0100.06020.10
7.0.10.0070.08319.97
7.0.00.0130.08320.20
5.6.280.0000.04020.84
5.6.240.0100.08020.65
5.6.230.0030.08720.64
5.6.220.0070.08020.50
5.6.210.0100.08320.59
5.6.200.0100.06321.10
5.6.190.0030.09021.07
5.6.180.0070.04721.19
5.6.170.0100.04721.18
5.6.160.0200.07021.17
5.6.150.0170.07721.19
5.6.140.0030.05721.19
5.6.130.0100.08021.09
5.6.120.0130.06021.14
5.6.110.0100.07021.08
5.6.100.0170.07321.16
5.6.90.0030.05020.94
5.6.80.0130.05320.54
5.6.70.0100.06320.38
5.6.60.0070.03720.59
5.6.50.0100.06320.45
5.6.40.0070.07720.40
5.6.30.0100.07020.53
5.6.20.0070.06720.43
5.6.10.0070.05020.38
5.6.00.0100.07320.39
5.5.380.0100.05020.55
5.5.370.0030.08320.47
5.5.360.0170.07020.37
5.5.350.0130.06320.43
5.5.340.0100.06020.94
5.5.330.0100.05720.89
5.5.320.0070.04720.93
5.5.310.0130.08020.92
5.5.300.0100.09020.97
5.5.290.0070.07720.93
5.5.280.0100.08020.84
5.5.270.0070.04720.95
5.5.260.0100.07320.95
5.5.250.0070.07720.75
5.5.240.0030.08720.36
5.5.230.0130.03720.31
5.5.220.0070.04020.19
5.5.210.0070.07320.27
5.5.200.0070.06720.04
5.5.190.0100.08020.20
5.5.180.0070.08020.23
5.5.160.0130.05320.23
5.5.150.0100.08020.03
5.5.140.0170.07720.28
5.5.130.0130.07320.27
5.5.120.0100.07020.27
5.5.110.0230.05320.22
5.5.100.0000.07720.17
5.5.90.0070.06720.21
5.5.80.0030.08020.06
5.5.70.0070.08019.98
5.5.60.0070.07720.17
5.5.50.0100.07720.11
5.5.40.0000.07720.14
5.5.30.0070.04720.11
5.5.20.0070.08320.11
5.5.10.0100.04020.09
5.5.00.0100.08320.15

preferences:
49.8 ms | 401 KiB | 5 Q