3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array( 'Enclosure ' => 12.22, 'Old Blood ' => 24.99, 'Metro Redux' => 19.99, 'Unity ' => 22.50, 'Far Cry 4 ' => 38.75, 'COD ' => 33.47, 'Destiny ' => 19.99 ); $total_price = 0; foreach( $items as $name => $price ) { $total_item_price = $price * 1.25; echo $name .' $'. $price . ' => $'. $total_item_price . ' (EGP '. round($total_item_price * 7.8) .')' ."\n"; $total_price = $total_price + $total_item_price; } echo "---------------------------------\n"; echo "Total: ". $total_price ." (EGP ". round($total_price * 7.8) .")";
Output for git.master, git.master_jit, rfc.property-hooks
Enclosure $12.22 => $15.275 (EGP 119) Old Blood $24.99 => $31.2375 (EGP 244) Metro Redux $19.99 => $24.9875 (EGP 195) Unity $22.5 => $28.125 (EGP 219) Far Cry 4 $38.75 => $48.4375 (EGP 378) COD $33.47 => $41.8375 (EGP 326) Destiny $19.99 => $24.9875 (EGP 195) --------------------------------- Total: 214.8875 (EGP 1676)

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:
49.22 ms | 402 KiB | 8 Q