3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sSecretKey = 'TrueID2015tRUEid'; $json = json_encode([ "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" => [ "count" => "2", "invoicelist" => [ [ "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" ], [ "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.60.0100.00316.62
8.3.50.0180.00722.05
8.3.40.0040.01118.65
8.3.30.0040.01118.54
8.3.20.0030.00520.34
8.3.10.0040.00421.91
8.3.00.0090.00019.17
8.2.180.0080.01116.88
8.2.170.0040.01122.96
8.2.160.0030.01022.25
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0090.00017.50
8.2.120.0050.00226.35
8.2.110.0000.01122.27
8.2.100.0070.00417.93
8.2.90.0040.00419.17
8.2.80.0040.00817.97
8.2.70.0000.00917.63
8.2.60.0030.00617.93
8.2.50.0050.00318.07
8.2.40.0060.00319.34
8.2.30.0040.00420.52
8.2.20.0090.00017.76
8.2.10.0030.00518.08
8.2.00.0070.00017.98
8.1.280.0130.00325.92
8.1.270.0000.00822.02
8.1.260.0000.00828.09
8.1.250.0080.00028.09
8.1.240.0000.00922.59
8.1.230.0040.00817.64
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0040.00417.35
8.1.190.0030.00517.35
8.1.180.0080.00018.10
8.1.170.0030.00618.50
8.1.160.0060.00322.01
8.1.150.0030.00518.89
8.1.140.0000.00819.57
8.1.130.0030.00317.65
8.1.120.0000.00717.39
8.1.110.0040.00417.39
8.1.100.0070.00017.47
8.1.90.0040.00417.41
8.1.80.0090.00017.40
8.1.70.0080.00017.23
8.1.60.0030.00617.53
8.1.50.0030.00617.46
8.1.40.0000.00817.60
8.1.30.0030.00917.50
8.1.20.0030.00717.53
8.1.10.0000.00717.59
8.1.00.0030.00917.52
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0000.00718.40
8.0.270.0070.00017.16
8.0.260.0050.00317.19
8.0.250.0000.00816.93
8.0.240.0040.00416.98
8.0.230.0030.00317.00
8.0.220.0000.00716.80
8.0.210.0030.00316.94
8.0.200.0000.00616.97
8.0.190.0050.00316.84
8.0.180.0070.00016.90
8.0.170.0030.00516.80
8.0.160.0030.00616.92
8.0.150.0030.00316.97
8.0.140.0000.00816.79
8.0.130.0050.00313.34
8.0.120.0080.00016.84
8.0.110.0000.00716.88
8.0.100.0030.00516.89
8.0.90.0080.00016.83
8.0.80.0060.01016.82
8.0.70.0030.00616.97
8.0.60.0040.00416.69
8.0.50.0000.00716.77
8.0.30.0140.00417.11
8.0.20.0150.00717.40
8.0.10.0090.00016.96
8.0.00.0080.01116.58
7.4.330.0000.00616.78
7.4.320.0000.00616.58
7.4.300.0030.00316.37
7.4.290.0030.00316.57
7.4.280.0000.00716.51
7.4.270.0000.00716.66
7.4.260.0030.00316.49
7.4.250.0040.00416.43
7.4.240.0020.00616.40
7.4.230.0080.00016.46
7.4.220.0140.01016.46
7.4.210.0070.01016.50
7.4.200.0000.00716.43
7.4.160.0120.00316.39
7.4.150.0140.00317.40
7.4.140.0150.00517.86
7.4.130.0110.00616.64
7.4.120.0090.00816.47
7.4.110.0070.01016.57
7.4.100.0130.01016.38
7.4.90.0100.00716.45
7.4.80.0070.01319.39
7.4.70.0070.01816.48
7.4.60.0000.01616.59
7.4.50.0060.00916.63
7.4.40.0090.00616.21
7.4.30.0140.00316.65
7.4.10.0060.01215.83
7.4.00.0040.01115.29
7.3.330.0000.00613.27
7.3.320.0060.00013.10
7.3.310.0000.00716.32
7.3.300.0040.00416.28
7.3.290.0030.00316.32
7.3.280.0060.01116.34
7.3.270.0150.00317.40
7.3.260.0090.00916.35
7.3.250.0080.01016.43
7.3.240.0090.00916.32
7.3.230.0070.01316.39
7.3.210.0110.00616.41
7.3.200.0090.00916.41
7.3.190.0060.00916.61
7.3.180.0110.00416.16
7.3.170.0100.00716.43
7.3.160.0090.00616.31
7.3.130.0080.01015.66
7.3.120.0050.01115.25
7.3.110.0080.00915.22
7.3.100.0080.00715.10
7.3.90.0030.01115.13
7.3.80.0040.01015.08
7.3.70.0040.00915.17
7.3.60.0080.00615.09
7.3.50.0050.00615.20
7.3.40.0070.00615.14
7.3.30.0070.00815.07
7.3.20.0050.00716.96
7.3.10.0090.00416.87
7.3.00.0070.00716.84
7.2.330.0130.00416.53
7.2.320.0130.00916.74
7.2.310.0030.01316.70
7.2.300.0130.00616.71
7.2.290.0170.00716.38
7.2.260.0120.00715.79
7.2.250.0070.01015.23
7.2.240.0050.01115.38
7.2.230.0060.00915.18
7.2.220.0050.00915.40
7.2.210.0060.00915.28
7.2.200.0050.00915.24
7.2.190.0090.00615.29
7.2.180.0070.00615.22
7.2.170.0080.00815.36
7.2.160.0060.00515.63
7.2.150.0070.00717.57
7.2.140.0030.01117.40
7.2.130.0060.00817.20
7.2.120.0110.00617.03
7.2.110.0040.01417.09
7.2.100.0050.01017.07
7.2.90.0050.00917.08
7.2.80.0050.01017.13
7.2.70.0070.00817.21
7.2.60.0060.00817.07
7.2.50.0080.00617.16
7.2.40.0070.00817.26
7.2.30.0050.00717.12
7.2.20.0070.00617.01
7.2.10.0070.00817.20
7.2.00.0030.01117.73
7.1.330.0110.00416.04
7.1.320.0030.00916.00
7.1.310.0090.00516.28
7.1.300.0040.00916.12
7.1.290.0040.00916.15
7.1.280.0050.00916.13
7.1.270.0050.00816.05
7.1.260.0030.00916.05
7.1.250.0080.00915.95
7.1.240.0070.00816.47
7.1.230.0050.01116.40
7.1.220.0030.01016.37
7.1.210.0080.00516.47
7.1.200.0050.00916.01
7.1.190.0070.00616.51
7.1.180.0050.01016.44
7.1.170.0090.00516.43
7.1.160.0030.00916.48
7.1.150.0050.00916.45
7.1.140.0070.00716.44
7.1.130.0000.01416.36
7.1.120.0050.00716.51
7.1.110.0070.00516.49
7.1.100.0070.00816.99
7.1.90.0070.00916.47
7.1.80.0010.00916.37
7.1.70.0050.00716.58
7.1.60.0080.00917.53
7.1.50.0080.00916.58
7.1.40.0090.00616.31
7.1.30.0070.00716.54
7.1.20.0050.00616.44
7.1.10.0020.01416.39
7.1.00.0040.02918.46
7.0.330.0050.00816.01
7.0.320.0040.00916.20
7.0.310.0020.01116.20
7.0.300.0070.00816.18
7.0.290.0040.00916.24
7.0.280.0070.00715.87
7.0.270.0020.01016.12
7.0.260.0080.00616.06
7.0.250.0070.00716.02
7.0.240.0080.00616.21
7.0.230.0130.00216.05
7.0.220.0040.00916.08
7.0.210.0080.00516.19
7.0.200.0220.00515.49
7.0.190.0060.00816.17
7.0.180.0100.00416.14
7.0.170.0050.00816.12
7.0.160.0070.00316.25
7.0.150.0090.00516.15
7.0.140.0020.01215.94
7.0.130.0020.01116.12
7.0.120.0050.00815.99
7.0.110.0060.00616.14
7.0.100.0060.00716.19
7.0.90.0220.03117.37
7.0.80.0160.02317.40
7.0.70.0150.03117.47
7.0.60.0160.02417.31
7.0.50.0230.03617.63
7.0.40.0060.02116.07
7.0.30.0070.03616.18
7.0.20.0120.01716.12
7.0.10.0030.03016.08
7.0.00.0030.02516.18
5.6.400.0090.00315.11
5.6.390.0040.01014.80
5.6.380.0060.00815.00
5.6.370.0070.00814.89
5.6.360.0040.01015.11
5.6.350.0050.00514.89
5.6.340.0080.00514.79
5.6.330.0070.00614.87
5.6.320.0030.01115.03
5.6.310.0070.00515.02
5.6.300.0100.00314.75
5.6.290.0050.00815.03
5.6.280.0070.02417.11
5.6.270.0070.00714.81
5.6.260.0080.00315.07
5.6.250.0070.00715.04
5.6.240.0030.02116.76
5.6.230.0060.03216.84
5.6.220.0020.03316.83
5.6.210.0060.02816.73
5.6.200.0090.02716.92
5.6.190.0060.03316.97
5.6.180.0060.02217.00
5.6.170.0010.02417.00
5.6.160.0060.02717.00
5.6.150.0060.02117.04
5.6.140.0060.03017.01
5.6.130.0050.02217.00
5.6.120.0090.02016.99
5.6.110.0100.02816.96
5.6.100.0080.02917.07
5.6.90.0090.02617.11
5.6.80.0020.02916.82
5.6.70.0060.02916.74
5.6.60.0050.02316.75
5.6.50.0080.02216.69
5.6.40.0010.03716.76
5.6.30.0080.03016.78
5.6.20.0070.02316.79
5.6.10.0060.03216.66
5.6.00.0050.02316.68
5.5.380.0060.02616.77
5.5.370.0060.03016.62
5.5.360.0040.02516.75
5.5.350.0040.02316.69
5.5.340.0070.03116.97
5.5.330.0050.03516.86
5.5.320.0020.03516.89
5.5.310.0090.03116.88
5.5.300.0100.02816.84
5.5.290.0060.03116.93
5.5.280.0070.01516.86
5.5.270.0070.03316.93
5.5.260.0070.03117.03
5.5.250.0090.02916.72
5.5.240.0050.02116.65
5.5.230.0060.02716.80
5.5.220.0040.02016.66
5.5.210.0060.03216.52
5.5.200.0060.03216.57
5.5.190.0080.02016.61
5.5.180.0070.03316.54
5.5.170.0050.00914.86
5.5.160.0060.03316.64
5.5.150.0070.03216.62
5.5.140.0090.02416.49
5.5.130.0070.02416.53
5.5.120.0080.02716.54
5.5.110.0040.03116.51
5.5.100.0090.03016.63
5.5.90.0080.02816.63
5.5.80.0050.02116.54
5.5.70.0090.02416.48
5.5.60.0050.03016.72
5.5.50.0030.03416.65
5.5.40.0070.03116.46
5.5.30.0060.03216.59
5.5.20.0070.03116.45
5.5.10.0040.02216.64
5.5.00.0110.01616.52

preferences:
50.17 ms | 401 KiB | 5 Q