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; } 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(); ?>
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.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected '}' in /in/8A69F on line 36
Process exited with code 255.

preferences:
164.57 ms | 1387 KiB | 25 Q