3v4l.org

run code in 500+ PHP versions simultaneously
<?php // Define a constant for the sales tax rate const TAX_RATE = 0.08; $productPrice = 150; $totalPrice = $productPrice + ($productPrice * TAX_RATE); echo "Product price: $" . $productPrice . PHP_EOL; echo "Tax rate: " . (TAX_RATE * 100) . "%" . PHP_EOL; echo "Total price: $" . $totalPrice . PHP_EOL;
Output for master
Product price: $150 Tax rate: 8% Total price: $162

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:
28.08 ms | 1164 KiB | 7 Q