3v4l.org

run code in 300+ PHP versions simultaneously
<?php $service_url = "http://127.0.0.1:8000/api/thesis/?format=json"; //initialize a curl session $curl = curl_init($service_url); //set options for the transfer curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_TIMEOUT, 5); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($curl, CURLOPT_POST, 0); //execute the session $curl_response = curl_exec($curl); //TODO //set up the database connection echo "Hello Munir :D"; //$p = phpinfo(); //echo $p; //finish off the session curl_close($curl); $curl_jason = json_decode($curl_response, true); print_r($curl_jason); echo $curl_jason; echo curl_error($curl_response); ?>

preferences:
27.22 ms | 405 KiB | 5 Q