3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ch = curl_init(); $fields = array( 'format'=>'json', 'api_key'=>'113dd81fd2114fe8b9bfd0df5ed1c7e7', 'api_secret'=>'d114f87b30cf4a528fbdb6c4e88356ca5ffe3b38da57498d886739db04103a4e' ); $postvars = ''; foreach($fields as $key=>$value) { $postvars .= $key . "=" . $value . "&"; } $url = "https://castlesports.revelup.com/inventoryx/api/inventory/Product/"; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST, 1); //0 for a get request curl_setopt($ch,CURLOPT_POSTFIELDS,$postvars); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,3); curl_setopt($ch,CURLOPT_TIMEOUT, 20); $response = curl_exec($ch); print "curl response is:" . $response; curl_close ($ch); ?>
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/QVkMr:2 Stack trace: #0 {main} thrown in /in/QVkMr on line 2
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Call to undefined function curl_init() in /in/QVkMr on line 2
Process exited with code 255.