3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = 'https://api.lkqd.com/reports'; $data = array('key1' => 'value1', 'key2' => 'value2'); $body = array( "timeDimension" => "HOURLY", // OVERALL, DAILY, HOURLY "reportType" => ["PARTNER"], // Up to 3 dimensions among OVERVIEW, PARTNER, DOMAIN, APP_NAME, SITE, SOURCE, DEAL, TAG, FORMAT, COUNTRY, CUSTOM1, CUSTOM2, CUSTOM3, OS, DEVICE, PLAYER_WIDTH_HEIGHT "reportFormat" => "JSON", // JSON, CSV "startDate" => "2015-01-08", // Required, These are in America/New_York timezone by default "endDate" => "2015-01-09", // Required, These are in America/New_York timezone by default "startHour" => 5, // Optional, only meaningful for HOURLY time dimension, must be Int (not String) "endHour" => 19, // Optional, only meaningful for HOURLY time dimension, must be Int (not String) "timezone" => "UTC", // "UTC" and "America/New_York" currently supported "sort" => array( "field" => "field_name1", // field_name1, field_name2, field_name3, ad_requests, ad_impressions, ad_fill_rate, ad_cpm, ad_revenue, ad_ctr, ad_vtr "order" => "desc" // asc, desc ), "limit" => 100, // default is unlimited "offset" => 300 // default 0 ); // use key 'http' even if you send the request to https://... $options = array( 'http' => array( 'header' => "Content-type: application/json", 'method' => 'POST', 'content' => http_build_query($body), ), ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); var_dump($result);

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.110.0130.00716.81
7.2.80.0130.00016.68
7.2.60.0030.01016.90
7.2.00.0030.01419.42
7.1.200.0110.00015.74
7.1.100.0110.00418.38
7.1.70.0000.00817.43
7.1.60.0130.01320.03
7.1.50.0180.00717.20
7.1.00.0100.07322.65
7.0.200.0280.00414.61
7.0.60.0070.06020.39
7.0.50.0070.04718.25
7.0.40.0070.08320.48
7.0.30.0300.04320.49
7.0.20.0300.08320.56
7.0.10.0070.09320.43
7.0.00.0070.09020.45
5.6.280.0100.05721.48
5.6.210.0070.08021.18
5.6.200.0100.08018.41
5.6.190.0100.08721.06
5.6.180.3800.03721.04
5.6.170.0230.05320.97
5.6.160.0100.05720.95
5.6.150.0070.03718.52
5.6.140.0070.07718.38
5.6.130.0030.05718.65
5.6.120.0070.06021.25
5.6.110.0100.08721.32
5.6.100.0170.07321.27
5.6.90.0170.06021.41
5.6.80.0100.03720.91
5.6.70.5070.03720.92
5.5.350.0230.08020.77
5.5.340.0100.07718.46
5.5.330.0100.04020.88
5.5.320.3200.03720.58
5.5.310.0230.06720.67
5.5.300.0070.06718.43
5.5.290.0030.04318.41
5.5.280.0230.07021.15
5.5.270.0070.03721.24
5.5.260.0000.05021.09
5.5.250.0100.06021.11
5.5.240.0200.07320.69
5.4.450.0700.06019.57
5.4.440.0800.04719.80
5.4.430.0830.06019.75
5.4.420.0730.06019.63
5.4.410.0870.04719.55
5.4.400.1030.04719.38
5.4.390.0600.05319.25
5.4.380.0870.06719.44
5.4.370.0500.05719.48
5.4.360.0600.05019.44
5.4.350.0570.05719.47
5.4.340.0530.06319.44
5.4.320.0570.05719.31
5.4.310.0770.05019.36
5.4.300.0730.06019.43
5.4.290.0770.04719.30
5.4.280.1030.05019.19
5.4.270.0670.05319.33
5.4.260.0670.04719.34
5.4.250.0600.05319.31
5.4.240.0700.05319.16
5.4.230.0630.04719.48
5.4.220.0630.04719.30
5.4.210.0900.05019.36
5.4.200.0430.06019.33
5.4.190.0600.04719.34
5.4.180.0570.05719.19
5.4.170.0570.05019.15
5.4.160.0570.05019.23
5.4.150.0600.06019.17
5.4.140.0730.04716.45
5.4.130.0530.05016.47
5.4.120.0500.06016.56
5.4.110.0570.04716.54
5.4.100.0570.05016.54
5.4.90.0630.04016.59
5.4.80.0570.05316.01
5.4.70.0030.07016.20
5.4.60.0330.07316.24
5.4.50.0000.03316.19
5.4.40.0470.05016.31
5.4.30.0370.06316.37
5.4.20.0300.07016.33
5.3.290.0630.05315.16
5.3.280.0830.05715.16
5.3.270.1300.03015.16
5.3.260.1000.05015.16
5.3.250.1070.03715.16
5.3.240.0970.04315.16
5.3.230.1000.03015.16
5.3.220.0100.04015.16
5.3.210.0670.04015.16
5.3.200.1130.03315.16
5.3.190.0970.05015.16
5.3.180.0500.03315.16