3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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.0.0 - 7.2.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 hhvm-3.18.5 - 3.22.0
<hr><br><b>RCN ASSET</b> <br> BUY: eth SELL: eth<br>Eth get: 0<br>Net: -0.07219200 eth<hr><hr><br><b>BCPT ASSET</b> <br> BUY: eth SELL: eth<br>Eth get: 0<br>Net: -0.05959536 eth<hr>
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function curl_init() in /in/bsr9a on line 2
Process exited with code 255.