3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bin1 = curl_init(); curl_setopt($bin1, CURLOPT_URL, "https://api.binance.com/api/v3/ticker/bookTicker?symbol=RCNETH"); curl_setopt($bin1, CURLOPT_RETURNTRANSFER, 1); $output1 = curl_exec($bin1); $arraydata1 = json_decode($output1,true); echo '<hr>'; print_r($arraydata1); echo '<br><b>RCN ASSET</b> <br>'; //echo 'LAST:'.$arraydata2[''].' eth'; echo ' BUY:'.$arraydata1['bidPrice'].' eth'; echo ' SELL:'.$arraydata1['askPrice'].' eth'; //$belibin = $arraydata3['askPrice']; $totrcn= 282; $belircn = 0.07219200; $jualrcn = $arraydata1['bidPrice']; $hasilrcn = ($totrcn*$jualrcn) - $belircn; //echo number_format($totrcn)*$jualrcn.'<br>'; //echo $hasilrcn.' '.$jualrcn.' '.$belircn; echo '<br>Eth get: '.$totrcn*$jualrcn; echo '<br>Net: '.number_format($hasilrcn,8).' eth'; echo '<hr>'; $bin2 = curl_init(); curl_setopt($bin2, CURLOPT_URL, "https://api.binance.com/api/v3/ticker/bookTicker?symbol=BCPTETH"); curl_setopt($bin2, CURLOPT_RETURNTRANSFER, 1); $output2 = curl_exec($bin2); $arraydata2 = json_decode($output2,true); echo '<hr>'; print_r($arraydata2); echo '<br><b>BCPT ASSET</b> <br>'; echo ' BUY:'.$arraydata2['bidPrice'].' eth'; echo ' SELL:'.$arraydata2['askPrice'].' eth'; $totbcpt= 132; $belibcpt = 0.05959536; $jualbcpt = $arraydata2['bidPrice']; $hasilbcpt = ($totbcpt*$jualbcpt) - $belibcpt; echo '<br>Eth get: '.$totbcpt*$jualbcpt; echo '<br>Net: '.number_format($hasilbcpt,8).' eth'; echo '<hr>';
Output for 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
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/bsr9a:2 Stack trace: #0 {main} thrown in /in/bsr9a on line 2
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 Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/bsr9a:2 Stack trace: #0 {main} thrown in /in/bsr9a on line 2
Process exited with code 255.

preferences:
177.81 ms | 401 KiB | 187 Q