3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(300); echo 'START'; flush(); $key = "hKRDnKagmecgYVrrDwBb"; $token = "5fqicwqzql1HsVE5uXnKubyvyKOaX4mYddL0"; $accountId = "28"; //$url = "https://dataapi.autoplay.co.nz/"; $url = "https://dataapi.aptest.co.nz/"; $fred = "?id=".$accountId; $fred .= "&yard=2867"; $fred .= "&pageSize=2"; $fred .= "&pageNumber=1"; $ch = curl_init($url.'search.ashx'.$fred); curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // uncomment this line if you get no gateway response. ### curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_MAXREDIRS, 5); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_STDERR, $fp); $headers = array( 'Key: '.$key, 'Token: '.$token ); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLINFO_HEADER_OUT, true); //curl_setopt($ch, CURLOPT_URL, $url."search.asx" ); //curl_setopt($ch, CURLOPT_POST, true ); //curl_setopt($ch, CURLOPT_POSTFIELDS, $Something is wrong); // use HTTP POST to send form data echo '<br>GOING TO DO REQUEST'; flush(); $result = curl_exec($ch); $headers_info = curl_getinfo($ch); echo "HEADERS:<pre>".print_r($headers_info, true)."</pre>"; flush(); echo "RESULT:<pre>".print_r($result, true)."</pre>"; flush(); ?>
Output for 7.0.0 - 7.0.20, 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.4, 8.3.6
START Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/r8WLW:19 Stack trace: #0 {main} thrown in /in/r8WLW on line 19
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 START Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/r8WLW:19 Stack trace: #0 {main} thrown in /in/r8WLW on line 19
Process exited with code 255.

preferences:
172.71 ms | 402 KiB | 218 Q