3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lips_inv = 4; $bill_inv = 4; $quantity = $lips_inv + $bill_inv; $distributer_price = 440.00; function lip_price($p) { $markup = $p * 0.17; $total = $p + $markup; $rounded = ceil($total / 10) * 10; $new_price = $rounded - 1; return $new_price; } function bil_price($p) { $markup = $p * 0.20; $total = $p + $markup; $rounded = ceil($total / 10) * 10; $new_price = $rounded - 1; return $new_price; } echo "Distributer Price: $"; echo $distributer_price; echo " "; echo "Lips Inventory: "; echo $lips_inv; echo " "; echo "Bils Inventory: "; echo $bill_inv; echo " "; echo "Price: $"; if($lips_inv < 1) { if($bill_inv >= 1) { $price = bil_price($distributer_price); } else { $price = lip_price($distributer_price); } } else { $price = lip_price($distributer_price); } echo $price; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Distributer Price: $440 Lips Inventory: 4 Bils Inventory: 4 Price: $519

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:
47.67 ms | 401 KiB | 8 Q