3v4l.org

run code in 500+ PHP versions simultaneously
<?php // 补贴比例 $subsidy = 0.10; // 最大补贴金额 $maxSubsidy = 500; // 原价 $regular_price = 4999; // 补贴 $subsidy_amount = min($maxSubsidy, $regular_price * $subsidy); // 现价 $sale_price = $regular_price - $subsidy_amount; // 结果 $result = [ '原价:' . $regular_price, '补贴:' . $subsidy_amount, '现价:' . $sale_price, ]; echo implode("\r\n", $result);
Output for git.master_jit, git.master
原价:4999 补贴:499.9 现价:4499.1

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:
35.55 ms | 729 KiB | 4 Q