3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $gcal_path = "https://www.googleapis.com/calendar/v3/calendars/matrixis.co.uk_0bcoibk2a2t8i8637golf855h4@group.calendar.google.com/events?key=AIzaSyBvaIP4JyhADGRhPDccnNsJ0W1wUxc2fAU&maxResults=1&singleEvents=True&orderBy=startTime"; //create cURL connection $curl_connection = curl_init('https://www.googleapis.com/calendar/v3/calendars/matrixis.co.uk_0bcoibk2a2t8i8637golf855h4@group.calendar.google.com/events?key=AIzaSyBvaIP4JyhADGRhPDccnNsJ0W1wUxc2fAU&maxResults=1&singleEvents=True&orderBy=startTime'); //set options curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"); curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1); //set data to be posted curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string); //perform our request $result = curl_exec($curl_connection); //close the connection curl_close($curl_connection); // Populate the '$feed' variable with decoded JSON data. $dataArray = json_decode($result); $nextStartTime = $dataArray['items']['start']['dateTime']; $nextEndTime = $dataArray['items']['end']['dateTime']; $summary = $dataArray['items']['summary']; echo $dataArray . '<br>'; echo $nextStartTime . '<br>'; echo $nextEndTime . '<br>'; echo $summary . '<br>'; ?>
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/JshOc:5 Stack trace: #0 {main} thrown in /in/JshOc on line 5
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Call to undefined function curl_init() in /in/JshOc on line 5
Process exited with code 255.