3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, 'https://api.appannie.com/v1.2/accounts'); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Authorization: Bearer 713fe46c23f089d841c0809c9df0fce0a37bb2cd' )); $run = curl_exec($ch); curl_close($ch); $arr = json_decode($run, true); // print_r($arr); $account_ids = array(); foreach($arr['accounts'] as $account) { $account_ids[] = $account['account_id']; // $account_id = $account['account_id']; // $ch2 = curl_init(); // curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); // curl_setopt($ch2, CURLOPT_URL, 'https://api.appannie.com/v1.2/accounts/' . $account_id . '/sales?break_down=product&start_date=2015-01-01&end_date=2015-01-31'); // curl_setopt($ch2, CURLOPT_HTTPHEADER, array( // 'Content-Type: application/json', // 'Authorization: Bearer 8a2d2958e05107d04ac4bb25687dfb2b56366de7' // )); // $run2 = curl_exec($ch2); // curl_close($ch2); // $arr2 = json_decode($run2, true); // print_r($arr2); // // foreach($arr2['account_id'] as $account_id2){ // // $account_ids[] = $account_id2; // } } foreach($account_ids as $account_id){ $ch2 = curl_init(); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch2, CURLOPT_URL, 'https://api.appannie.com/v1.2/accounts/' . $account_id . '/sales?break_down=product&start_date=2015-01-01&end_date=2015-01-31'); curl_setopt($ch2, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Authorization: Bearer 8a2d2958e05107d04ac4bb25687dfb2b56366de7' )); $run2 = curl_exec($ch2); curl_close($ch2); $arr2 = json_decode($run2, true); } $product_ids = array(); foreach($arr2['sales_list'] as $sales_list) { $product_ids[] = $sales_list['product_id']; } print_r($product_ids); ?>

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.01116.37
8.3.50.0100.01222.05
8.3.40.0140.00018.88
8.3.30.0070.00718.65
8.3.20.0080.00020.07
8.3.10.0030.00623.71
8.3.00.0000.00820.74
8.2.180.0180.00416.75
8.2.170.0150.00618.91
8.2.160.0090.00622.96
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0060.00319.24
8.2.120.0080.00026.35
8.2.110.0030.00620.57
8.2.100.0060.00617.91
8.2.90.0040.00419.22
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0040.00417.90
8.2.50.0070.00318.07
8.2.40.0030.00522.38
8.2.30.0000.00720.75
8.2.20.0040.00417.63
8.2.10.0040.00418.01
8.2.00.0040.00418.02
8.1.280.0150.00025.92
8.1.270.0040.00420.43
8.1.260.0050.00328.09
8.1.250.0100.00328.09
8.1.240.0090.00022.20
8.1.230.0000.01217.53
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0060.00317.22
8.1.190.0040.00417.25
8.1.180.0060.00318.10
8.1.170.0030.00518.57
8.1.160.0040.00420.71
8.1.150.0080.00018.89
8.1.140.0000.00819.46
8.1.130.0030.00317.67
8.1.120.0000.00717.30
8.1.110.0070.00017.34
8.1.100.0080.00017.23
8.1.90.0020.00517.43
8.1.80.0040.00417.31
8.1.70.0030.00517.30
8.1.60.0000.00817.37
8.1.50.0050.00317.45
8.1.40.0040.00417.50
8.1.30.0060.00317.52
8.1.20.0040.00417.52
8.1.10.0040.00417.47
8.1.00.0040.00417.48
8.0.300.0000.00718.77
8.0.290.0030.00316.63
8.0.280.0030.00318.42
8.0.270.0030.00317.22
8.0.260.0030.00317.10
8.0.250.0030.00517.01
8.0.240.0000.00816.95
8.0.230.0000.00716.93
8.0.220.0030.00316.87
8.0.210.0000.00716.91
8.0.200.0000.00716.87
8.0.190.0070.00016.97
8.0.180.0060.00316.86
8.0.170.0040.00416.91
8.0.160.0000.00816.76
8.0.150.0000.00716.87
8.0.140.0000.00716.86
8.0.130.0040.00413.41
8.0.120.0000.00816.93
8.0.110.0080.00016.92
8.0.100.0050.00316.79
8.0.90.0000.00716.98
8.0.80.0160.00716.98
8.0.70.0000.00716.83
8.0.60.0040.00416.79
8.0.50.0070.00016.88
8.0.30.0090.01117.13
8.0.20.0150.00517.40
8.0.10.0000.00716.85
8.0.00.0100.01216.75
7.4.330.0020.00216.80
7.4.320.0070.00016.40
7.4.300.0030.00316.50
7.4.290.0000.00716.48
7.4.280.0040.00416.45
7.4.270.0030.00316.33
7.4.260.0030.00516.52
7.4.250.0000.00816.44
7.4.240.0020.00516.42
7.4.230.0030.00316.59
7.4.220.0040.01516.56
7.4.210.0050.01116.44
7.4.200.0070.00016.50
7.4.160.0090.00616.67
7.4.150.0070.01417.40
7.4.140.0120.00817.86
7.4.130.0100.00916.47
7.4.120.0100.00816.34
7.4.110.0090.01016.61
7.4.100.0150.00916.74
7.4.90.0110.00616.38
7.4.80.0100.01019.39
7.4.70.0090.01216.39
7.4.60.0040.01116.41
7.4.50.0030.01316.45
7.4.40.0160.00016.52
7.4.30.0130.00916.45
7.4.00.0060.00615.12
7.3.330.0030.00313.06
7.3.320.0070.00013.13
7.3.310.0040.00416.12
7.3.300.0040.00416.30
7.3.290.0000.00716.14
7.3.280.0110.00616.29
7.3.270.0060.01117.40
7.3.260.0170.00016.45
7.3.250.0100.01216.31
7.3.240.0120.00516.29
7.3.230.0060.01416.39
7.3.210.0070.01016.25
7.3.200.0100.00716.26
7.3.190.0090.01316.52
7.3.180.0130.01016.55
7.3.170.0080.01116.46
7.3.160.0030.01316.31
7.3.10.0140.00415.81
7.3.00.0360.00715.96
7.2.330.0100.01616.33
7.2.320.0130.01016.53
7.2.310.0100.00716.47
7.2.300.0120.00916.52
7.2.290.0090.01516.58
7.2.130.0240.00716.54
7.2.120.0220.01416.30
7.2.110.0160.01116.31
7.2.100.0700.00716.73
7.2.90.0440.00016.21
7.2.80.0400.01316.12
7.2.70.0410.01016.88
7.2.60.0110.00616.70
7.2.50.0130.01016.32
7.2.40.0340.00615.98
7.2.30.0320.00316.35
7.2.20.0110.01515.99
7.2.10.0270.00316.06
7.2.00.0150.00416.66
7.1.250.0380.01015.74
7.1.200.0100.00015.76
7.1.100.0070.01018.09
7.1.70.0000.01016.68
7.1.60.0030.01719.52
7.1.50.0070.01316.70
7.1.00.0070.07022.45
7.0.200.0040.00416.79
7.0.60.0170.07319.90
7.0.50.0100.07717.90
7.0.40.0070.04319.98
7.0.30.0370.04320.33
7.0.20.0170.04020.21
7.0.10.0100.08320.16
7.0.00.0100.07320.00
5.6.280.0030.04720.92
5.6.210.0100.04720.54
5.6.200.0170.06018.21
5.6.190.0130.07020.56
5.6.180.0270.08320.41
5.6.170.0170.06020.47
5.6.160.0030.07020.44
5.6.150.0070.07318.08
5.6.140.0000.06318.22
5.6.130.0070.08718.20
5.6.120.0070.08321.01
5.6.110.0070.08721.12
5.6.100.0100.05321.11
5.6.90.0130.08021.07
5.6.80.0070.08020.45
5.5.350.2930.03020.39
5.5.340.0030.07317.89
5.5.330.0130.08320.28
5.5.320.0500.07320.32
5.5.310.0400.07020.27
5.5.300.0030.04017.92
5.5.290.0030.07717.92
5.5.280.0100.08020.89
5.5.270.0200.07320.77
5.5.260.0030.07720.89
5.5.250.0030.08320.70
5.5.240.3430.02020.20

preferences:
55.23 ms | 401 KiB | 5 Q