3v4l.org

run code in 300+ PHP versions simultaneously
<?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.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
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.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Call to undefined function curl_init() in /in/QVkMr on line 2
Process exited with code 255.

preferences:
243.26 ms | 402 KiB | 328 Q