3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cookieFile = "cookies.txt"; if(!file_exists($cookieFile)) { $fh = fopen($cookieFile, "w"); fwrite($fh, ""); fclose($fh); } $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => 'http://localhost/mysite/test.php?data=hello', CURLOPT_HEADER => false, CURLOPT_COOKIESESSION=>true, CURLOPT_COOKIEFILE => $cookieFile, CURLOPT_COOKIEJAR => $cookieFile )); $resp = curl_exec($curl); curl_close($curl); echo $resp; ?>

preferences:
23.91 ms | 407 KiB | 5 Q