3v4l.org

run code in 300+ PHP versions simultaneously
<?php header("Content-Type: text/html; charset=utf-8"); $array1 = explode("\n",$_POST['mytxt2']); for($i=0;$i<sizeof($array1);$i++){ $array2[$i] = explode('=', $array1[$i]); } $final_balance =0; echo "address=n_tx=total_received=final_balance<br>"; $url = 'https://blockchain.info/multiaddr?active='; for($i=0;$i<sizeof($array2);$i++){ $url .= $array2[$i][1].'|'; if ((($i % 128 == 0)&($i <> 0)) || $i==sizeof($array2)-1) { $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL,$url); $result=curl_exec($ch); $obj = json_decode($result); for($j=0;$j<sizeof($obj->{'addresses'});$j++){ if($obj->{'addresses'}[$j]->{'n_tx'}>0) {echo "<b>";} if($obj->{'addresses'}[$j]->{'final_balance'}>0) {echo "<font color=red>";} $final_balance += $obj->{'addresses'}[$j]->{'final_balance'}/100000000; echo $obj->{'addresses'}[$j]->{'address'}.'='.($obj->{'addresses'}[$j]->{'n_tx'}).'='.(sprintf("%.7f", $obj->{'addresses'}[$j]->{'total_received'}/100000000)).'='.(sprintf("%.7f", $obj->{'addresses'}[$j]->{'final_balance'}/100000000)).'<br>'; if($obj->{'addresses'}[$j]->{'final_balance'}>0) {echo "</font color>";} if($obj->{'addresses'}[$j]->{'n_tx'}>0) {echo "</b>";} } echo '!<br>'; $url = 'https://blockchain.info/multiaddr?active='; } } echo '!ALL: <b>'.(sprintf("%.7f", $final_balance)).'</b> BTC<br>'; echo '<b>by agran / BTC: 1agran1xQ4Nwiqv1qegBDF6kqZdfESMUG</b>'; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "mytxt2" in /in/uU8tv on line 5 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/uU8tv on line 5 address=n_tx=total_received=final_balance<br> Warning: Undefined array key 1 in /in/uU8tv on line 13 Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/uU8tv:16 Stack trace: #0 {main} thrown in /in/uU8tv on line 16
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.89 ms | 402 KiB | 8 Q