curl_init()的替代?

I'm trying to debug some code using either of these two intrepreters. The code below runs on my GoDaddy site and produces the appropirate output arrays. But, won't run in either of these intrepreters. Is there a way to modify this code to run in the intrepreters so I can get past line 2 of the code? I inclcuded phpinfo(INFO_MODULES); at the end as an aid.

OR do you know of an online intrepreter that will run this code?

https://3v4l.org/

http://www.runphponline.com/

<?php  
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_HEADER, 0);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            $data = '';

            curl_setopt($ch, CURLOPT_URL, "https://api.iextrading.com/1.0/stock/market/batch?symbols=aapl,tsla,ge&types=quote,earnings,stats");
            $data = curl_exec($ch);
            curl_close($ch);

            $data = json_decode($data, true);

            // debug -------------------------------
            echo '  - ';
            echo (count($data));     // number of elements
            echo " - " . "<br />
";
            var_dump_pre($data);     // dump the array
            echo "-" . "<br />
";
            echo "xxxxxxxxxxxxxx-" . "<br />
";

            function var_dump_pre($mixed = null) {
            echo '<pre>';
            var_dump($mixed);
            echo '</pre>';
            return null;
            }

            phpinfo(INFO_MODULES);
?>

Since the code ran on my GoDaddy site I was able to copy the data returned from the '$data = curl_exec($ch);' insruction and assign it to a variable name at the start of the code I'm trying to debug. So, the code I'm trying to debug starts out with the intended incomimg data (and doesn't have to go get it). I can now continue to use any of these three online intrepreters:

https://3v4l.org/

http://www.runphponline.com/

http://phpfiddle.org/

http://php.net/manual/en/curl.installation.php

It looks like there are some dependancies that you have to install to use curl_init.

It looks like some poor sap did the work for you at http://phpfiddle.org/

Your code works there.