3v4l.org

run code in 300+ PHP versions simultaneously
<?php /********************************************************************************************************* 【概要】 与信要求 サンプルコード [プログラム言語] PHP [サーバサイド文字コード] UTF-8 [使用ライブラリ] PEARライブラリのHTTP_Requestモジュール **********************************************************************************************************/ // API送信データ $merchant_id = "62022"; $service_id = "001"; $cust_code = "SPSTestUser0001"; $order_id = "dcd297c04fc88974c7df19054171856b"; $item_id = "ITEMID00000000000000000000000001"; $item_name = "テスト商品"; $tax = "1"; $amount = "1"; $free1 = ""; $free2 = ""; $free3 = ""; $order_rowno = ""; $sps_cust_info_return_flg = "1"; $cc_number = "5250729026209007"; $cc_expiration = "201103"; $security_code = "798"; $cust_manage_flg = "0"; $encrypted_flg = "0"; $request_date = "20150605023010"; $limit_second = ""; $hashkey = "d7b6640cc5d286cbceab99b53bf74870cf6bce9c"; // Shift_JIS変換 $merchant_id = mb_convert_encoding($merchant_id, 'Shift_JIS', 'UTF-8'); $service_id = mb_convert_encoding($service_id, 'Shift_JIS', 'UTF-8'); $cust_code = mb_convert_encoding($cust_code, 'Shift_JIS', 'UTF-8'); $order_id = mb_convert_encoding($order_id, 'Shift_JIS', 'UTF-8'); $item_id = mb_convert_encoding($item_id, 'Shift_JIS', 'UTF-8'); $item_name = mb_convert_encoding($item_name, 'Shift_JIS', 'UTF-8'); $tax = mb_convert_encoding($tax, 'Shift_JIS', 'UTF-8'); $amount = mb_convert_encoding($amount, 'Shift_JIS', 'UTF-8'); $free1 = mb_convert_encoding($free1, 'Shift_JIS', 'UTF-8'); $free2 = mb_convert_encoding($free2, 'Shift_JIS', 'UTF-8'); $free3 = mb_convert_encoding($free3, 'Shift_JIS', 'UTF-8'); $order_rowno = mb_convert_encoding($order_rowno, 'Shift_JIS', 'UTF-8'); $sps_cust_info_return_flg = mb_convert_encoding($sps_cust_info_return_flg, 'Shift_JIS', 'UTF-8'); $cc_number = mb_convert_encoding($cc_number, 'Shift_JIS', 'UTF-8'); $cc_expiration = mb_convert_encoding($cc_expiration, 'Shift_JIS', 'UTF-8'); $security_code = mb_convert_encoding($security_code, 'Shift_JIS', 'UTF-8'); $cust_manage_flg = mb_convert_encoding($cust_manage_flg, 'Shift_JIS', 'UTF-8'); $encrypted_flg = mb_convert_encoding($encrypted_flg, 'Shift_JIS', 'UTF-8'); $request_date = mb_convert_encoding($request_date, 'Shift_JIS', 'UTF-8'); $limit_second = mb_convert_encoding($limit_second, 'Shift_JIS', 'UTF-8'); $hashkey = mb_convert_encoding($hashkey, 'Shift_JIS', 'UTF-8'); // 送信情報データ連結 $result = $merchant_id . $service_id . $cust_code . $order_id . $item_id . $item_name . $tax . $amount . $free1 . $free2 . $free3 . $order_rowno . $sps_cust_info_return_flg . $cc_number . $cc_expiration . $security_code . $cust_manage_flg . $encrypted_flg . $request_date . $limit_second . $hashkey; // SHA1変換 $sps_hashcode = sha1( $result ); // POSTデータ生成 $postdata = "<?xml version=\"1.0\" encoding=\"Shift_JIS\"?>" . "<sps-api-request id=\"ST01-00101-101\">" . "<merchant_id>" . $merchant_id . "</merchant_id>" . "<service_id>" . $service_id . "</service_id>" . "<cust_code>" . $cust_code . "</cust_code>" . "<order_id>" . $order_id . "</order_id>" . "<item_id>" . $item_id . "</item_id>" . "<item_name>" . base64_encode($item_name) . "</item_name>" . "<tax>" . $tax . "</tax>" . "<amount>" . $amount . "</amount>" . "<free1>" . base64_encode($free1) . "</free1>" . "<free2>" . base64_encode($free2) . "</free2>" . "<free3>" . base64_encode($free3) . "</free3>" . "<order_rowno>" . $order_rowno . "</order_rowno>" . "<sps_cust_info_return_flg>" . $sps_cust_info_return_flg . "</sps_cust_info_return_flg>" . "<dtls>" . "</dtls>" . "<pay_method_info>" . "<cc_number>" . $cc_number . "</cc_number>" . "<cc_expiration>" . $cc_expiration . "</cc_expiration>" . "<security_code>" . $security_code . "</security_code>" . "<cust_manage_flg>" . $cust_manage_flg . "</cust_manage_flg>" . "</pay_method_info>" . "<pay_option_manage>" . "</pay_option_manage>" . "<encrypted_flg>" . $encrypted_flg . "</encrypted_flg>" . "<request_date>" . $request_date . "</request_date>" . "<limit_second>" . $limit_second . "</limit_second>" . "<sps_hashcode>" . $sps_hashcode . "</sps_hashcode>" . "</sps-api-request>"; $url = "https://stbfep.sps-system.com/api/xmlapi.do"; // データ送信処理 echo $url.'<br/>'; echo $merchant_id . $service_id . ' - '. $hashkey.'<br/>'; echo $postdata.'<br/>'; ?>

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.0070.01517.00
8.3.50.0120.00921.40
8.3.40.0040.01118.79
8.3.30.0110.00419.08
8.3.20.0000.00820.47
8.3.10.0080.00023.66
8.3.00.0080.00019.08
8.2.180.0210.00017.00
8.2.170.0090.00622.96
8.2.160.0100.00320.64
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00321.30
8.2.110.0060.00322.46
8.2.100.0130.00018.00
8.2.90.0080.00019.47
8.2.80.0050.00318.00
8.2.70.0070.00418.00
8.2.60.0080.00018.41
8.2.50.0030.00618.07
8.2.40.0050.00318.47
8.2.30.0050.00218.20
8.2.20.0000.00817.94
8.2.10.0030.00518.26
8.2.00.0040.00418.35
8.1.280.0040.01125.92
8.1.270.0140.00420.58
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00421.09
8.1.230.0070.00417.61
8.1.220.0000.00918.01
8.1.210.0040.00418.77
8.1.200.0040.00417.60
8.1.190.0030.00617.60
8.1.180.0000.00818.10
8.1.170.0050.00320.44
8.1.160.0050.00322.31
8.1.150.0040.00419.16
8.1.140.0030.00517.73
8.1.130.0000.00718.12
8.1.120.0040.00417.73
8.1.110.0000.00717.84
8.1.100.0070.00017.76
8.1.90.0060.00417.77
8.1.80.0040.00717.79
8.1.70.0080.00417.80
8.1.60.0050.00817.90
8.1.50.0080.00417.79
8.1.40.0100.00517.83
8.1.30.0090.00517.90
8.1.20.0110.00317.92
8.1.10.0110.00317.88
8.1.00.0040.00917.80
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0040.00418.67
8.0.270.0050.00317.11
8.0.260.0060.00017.38
8.0.250.0000.00717.24
8.0.240.0000.00817.21
8.0.230.0040.00417.21
8.0.220.0080.00317.14
8.0.210.0100.00217.14
8.0.200.0060.00617.21
8.0.190.0050.00717.05
8.0.180.0060.00517.14
8.0.170.0060.00617.13
8.0.160.0060.00517.08
8.0.150.0080.00417.03
8.0.140.0080.00417.08
8.0.130.0080.00315.35
8.0.120.0090.00317.11
8.0.110.0060.00717.09
8.0.100.0050.00617.06
8.0.90.0070.00317.13
8.0.80.0070.00817.07
8.0.70.0070.00417.15
8.0.60.0060.00417.09
8.0.50.0060.00417.07
8.0.30.0070.01017.25
8.0.20.0100.00517.30
8.0.10.0060.00517.22
8.0.00.0050.00817.10
7.4.330.0000.00515.03
7.4.320.0000.00716.88
7.4.300.0050.00616.88
7.4.290.0060.00716.88
7.4.280.0100.00316.84
7.4.270.0060.00516.81
7.4.260.0090.00316.90
7.4.250.0090.00416.91
7.4.240.0050.00616.90
7.4.230.0040.00716.83
7.4.220.0110.00616.74
7.4.210.0090.00316.78
7.4.200.0060.00516.54
7.4.190.0100.00216.75
7.4.180.0050.00616.89
7.4.160.0040.00916.76
7.4.150.0070.00616.91
7.4.140.0070.00917.27
7.4.130.0070.00916.73
7.4.120.0070.00616.74
7.4.110.0070.00616.66
7.4.100.0090.00416.67
7.4.90.0050.00816.66
7.4.80.0070.00817.40
7.4.70.0110.00416.68
7.4.60.0100.00516.64
7.4.50.0090.00516.68
7.4.40.0140.00216.57
7.4.30.0060.00916.65
7.4.20.0030.01116.66
7.4.10.0080.00516.65
7.4.00.0060.00816.20
7.3.330.0090.00114.84
7.3.320.0080.00514.98
7.3.310.0030.00916.30
7.3.300.0070.00316.48
7.3.290.0090.00316.41
7.3.280.0080.00616.46
7.3.270.0070.00916.79
7.3.260.0070.00416.53
7.3.250.0100.00716.59
7.3.240.0040.01016.42
7.3.230.0080.00916.41
7.3.220.0070.00616.48
7.3.210.0100.00416.45
7.3.200.0080.00717.16
7.3.190.0040.01216.47
7.3.180.0100.00616.49
7.3.170.0070.00916.48
7.3.160.0050.01016.55
7.3.150.0090.00616.43
7.3.140.0110.00316.50
7.3.130.0080.00516.41
7.3.120.0100.00516.50
7.3.110.0050.00916.45
7.3.100.0070.00616.34
7.3.90.0080.00616.63
7.3.80.0120.00516.57
7.3.70.0070.00616.55
7.3.60.0060.00616.63
7.3.50.0060.00716.58
7.3.40.0090.00416.53
7.3.30.0080.00516.53
7.3.20.0050.00917.13
7.3.10.0060.00717.10
7.3.00.0110.00317.11
7.2.340.0090.00216.59
7.2.330.0070.00716.59
7.2.320.0110.00716.72
7.2.310.0060.00916.66
7.2.300.0120.00316.74
7.2.290.0070.01016.70
7.2.280.0080.00516.79
7.2.270.0070.00716.60
7.2.260.0020.01216.60
7.2.250.0060.00716.63
7.2.240.0100.00416.66
7.2.230.0070.00716.69
7.2.220.0060.00916.60
7.2.210.0090.00516.71
7.2.200.0080.00716.84
7.2.190.0090.00616.81
7.2.180.0080.00816.79
7.2.170.0080.00616.78
7.2.160.0090.00516.78
7.2.150.0110.00417.46
7.2.140.0060.00917.37
7.2.130.0070.00917.46
7.2.120.0090.00717.44
7.2.110.0090.00617.44
7.2.100.0100.00817.42
7.2.90.0130.00917.39
7.2.80.0110.00517.34
7.2.70.0100.00617.48
7.2.60.0100.00517.41
7.2.50.0120.00317.40
7.2.40.0130.00417.38
7.2.30.0110.00617.43
7.2.20.0140.00217.51
7.2.10.0090.00617.40
7.2.00.0100.00717.96
7.1.330.0120.00616.27
7.1.320.0120.00716.34
7.1.310.0100.00716.27
7.1.300.0110.00816.31
7.1.290.0120.00516.32
7.1.280.0100.00516.31
7.1.270.0130.00416.16
7.1.260.0070.01016.36
7.1.250.0130.00316.22
7.1.240.0140.00516.25
7.1.230.0180.00716.21
7.1.220.0110.00616.27
7.1.210.0120.00416.08
7.1.200.0120.00416.17
7.1.190.0110.00616.23
7.1.180.0060.00816.09
7.1.170.0100.00616.14
7.1.160.0110.00616.21
7.1.150.0120.00616.28
7.1.140.0140.00216.20
7.1.130.0090.00716.25
7.1.120.0090.00716.23
7.1.110.0080.00716.15
7.1.100.0090.00716.57
7.1.90.0090.00716.17
7.1.80.0090.00716.24
7.1.70.0090.00916.30
7.1.60.0130.00316.62
7.1.50.0160.00416.42
7.1.40.0080.00716.39
7.1.30.0100.00816.31
7.1.20.0100.00616.46
7.1.10.0080.00916.26
7.1.00.0100.00316.33
7.0.330.0100.00715.88
7.0.320.0090.00615.83
7.0.310.0120.00715.94
7.0.300.0090.00615.98
7.0.290.0100.00715.90
7.0.280.0180.00315.88
7.0.270.0160.00415.86
7.0.260.0130.00315.99
7.0.250.0140.00416.06
7.0.240.0120.00415.95
7.0.230.0150.00416.08
7.0.220.0130.00315.89
7.0.210.0120.00516.01
7.0.200.0070.00716.13
7.0.190.0090.00416.25
7.0.180.0090.00716.15
7.0.170.0100.00716.08
7.0.160.0130.00315.97
7.0.150.0110.00616.06
7.0.140.0080.00616.09
7.0.130.0080.00716.16
7.0.120.0100.00516.19
7.0.110.0090.00516.11
7.0.100.0080.00616.21
7.0.90.0110.00516.08
7.0.80.0090.00616.04
7.0.70.0100.00616.03
7.0.60.0090.00616.04
7.0.50.0080.00816.12
7.0.40.0080.01115.77
7.0.30.0090.00615.71
7.0.20.0090.00615.78
7.0.10.0080.00715.76
7.0.00.0090.00615.72
5.6.400.0120.00516.02
5.6.390.0120.00615.90
5.6.380.0070.01015.91
5.6.370.0100.00615.84
5.6.360.0050.01116.04
5.6.350.0050.01115.86
5.6.340.0080.00815.96
5.6.330.0130.00515.92
5.6.320.0110.00515.88
5.6.310.0070.00915.93
5.6.300.0080.02817.15
5.6.290.0090.01417.17
5.6.280.0110.01217.11
5.6.270.0070.01617.27
5.6.260.0110.01317.23
5.6.250.0100.01217.14
5.6.240.0100.01617.24
5.6.230.0080.01517.17
5.6.220.0090.01417.14
5.6.210.0060.01617.17
5.6.200.0100.01317.16
5.6.190.0090.01617.14
5.6.180.0080.01517.19
5.6.170.0090.01417.30
5.6.160.0130.02017.27
5.6.150.0140.01417.34
5.6.140.0090.01717.26
5.6.130.0090.02217.16
5.6.120.0110.01517.15
5.6.110.0080.03017.19
5.6.100.0070.02317.20
5.6.90.0070.01917.06
5.6.80.0050.01717.08
5.6.70.0110.02117.17
5.6.60.0070.01817.05
5.6.50.0070.01617.08
5.6.40.0130.01216.98
5.6.30.0080.01917.04
5.6.20.0070.01616.96
5.6.10.0080.01616.95
5.6.00.0080.01616.92
5.5.380.0090.01716.29
5.5.370.0100.01616.43
5.5.360.0120.01716.33
5.5.350.0080.01516.19
5.5.340.0090.01716.30
5.5.330.0080.01616.42
5.5.320.0110.01616.50
5.5.310.0100.01616.24
5.5.300.0070.01616.40
5.5.290.0120.01716.31
5.5.280.0120.01316.33
5.5.270.0110.01616.41
5.5.260.0070.01816.41
5.5.250.0120.01516.33
5.5.240.0130.01016.40
5.5.230.0090.01516.23
5.5.220.0090.01616.32
5.5.210.0080.01616.30
5.5.200.0070.01716.11
5.5.190.0110.02116.17
5.5.180.0050.01816.26
5.5.170.0090.00815.83
5.5.160.0060.01616.18
5.5.150.0090.01316.22
5.5.140.0110.01216.27
5.5.130.0100.01616.16
5.5.120.0070.01716.08
5.5.110.0070.01816.02
5.5.100.0080.02116.19
5.5.90.0110.01216.31
5.5.80.0100.01316.10
5.5.70.0100.01316.20
5.5.60.0110.01316.20
5.5.50.0070.01616.30
5.5.40.0090.01516.28
5.5.30.0080.01416.23
5.5.20.0070.01716.37
5.5.10.0080.01616.09
5.5.00.0100.01316.15
5.4.450.0070.01514.46
5.4.440.0100.01314.39
5.4.430.0090.01414.45
5.4.420.0090.01614.53
5.4.410.0100.01314.44
5.4.400.0100.01114.27
5.4.390.0070.01814.26
5.4.380.0110.01514.30
5.4.370.0080.01314.28
5.4.360.0100.01314.19
5.4.350.0080.01414.37
5.4.340.0060.01514.32
5.4.330.0090.00612.65
5.4.320.0080.01514.33
5.4.310.0070.01414.35
5.4.300.0080.01214.38
5.4.290.0050.01614.29
5.4.280.0060.01714.36
5.4.270.0110.01114.30
5.4.260.0060.01614.26
5.4.250.0100.01614.23
5.4.240.0090.01314.23
5.4.230.0080.01514.20
5.4.220.0130.00914.20
5.4.210.0080.01314.25
5.4.200.0080.01414.23
5.4.190.0110.01214.24
5.4.180.0080.01414.11
5.4.170.0110.01414.30
5.4.160.0100.01314.29
5.4.150.0110.01114.25
5.4.140.0070.01413.57
5.4.130.0040.01713.64
5.4.120.0110.00913.67
5.4.110.0070.01413.61
5.4.100.0120.01213.67
5.4.90.0090.01513.59
5.4.80.0080.01613.66
5.4.70.0100.01113.63
5.4.60.0080.01413.65
5.4.50.0090.01213.52
5.4.40.0080.01413.59
5.4.30.0090.01413.68
5.4.20.0090.01313.67
5.4.10.0080.01513.63
5.4.00.0120.01013.37

preferences:
68.48 ms | 401 KiB | 5 Q