3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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; } function 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); } return $price } echo "Distributer Price: $"; echo $distributer_price; echo " "; echo "Lips Inventory: "; echo $lips_inv; echo " "; echo "Bils Inventory: "; echo $bill_inv; echo " "; echo "Price: $"; echo price(); ?>
based on nav6C
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected '}', expecting ';' in /in/8A69F on line 36
Process exited with code 255.
Output for 5.3.21 - 5.6.16
Parse error: syntax error, unexpected '}' in /in/8A69F on line 36
Process exited with code 255.