3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'stn'; $password = '$ta7$T5d'; $url = 'https://purpleportal.net/api/location/v1/ping'; $token = base64_encode($username . ':' . $password); $curl = curl_init(); $headers = [ "Content-Type: application/json", "Authorization: basic " . $token, ]; curl_setopt_array($curl, [ CURLOPT_RETURNTRANSFER => 1, CURLOPT_HEADER => true, CURLOPT_URL => $url, CURLOPT_HTTPHEADER => $headers ]); $output = curl_exec($curl); // $info = curl_getinfo($curl, CURLINFO_HTTP_CODE); // var_dump($info); var_dump($output);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/3HtOl:7 Stack trace: #0 {main} thrown in /in/3HtOl on line 7
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.68 ms | 401 KiB | 8 Q