3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php //Your Site Settings $site_public_key = 'X'; $site_private_key = 'X'; //Connection Resource $resource_uri = 'https://api.lkqd.com/reports'; $body = '{ "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": [{ "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 }'; //Setup connection $curl = curl_init($resource_uri); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json","Authorization: xxxx")); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $body); curl_setopt($curl, CURLOPT_USERPWD, $site_public_key . ":" . $site_private_key); //Send request $result_json = curl_exec($curl); curl_close($curl); //Done print_r($result_json); $responseData = json_decode($response, TRUE); print_r($responseData); ?>
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.29, 5.6.8 - 5.6.13
Parse error: syntax error, unexpected '<' in /in/aW4aW on line 3
Process exited with code 255.

preferences:
171.05 ms | 1400 KiB | 62 Q