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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.70.0050.00216.77
8.5.60.0130.00416.94
8.5.50.0090.00818.48
8.5.30.0100.00817.27
8.5.20.0110.00717.27
8.5.10.0100.00817.27
8.5.00.0120.00617.27
8.4.220.0050.00323.77
8.4.210.0060.00319.46
8.4.180.0130.00819.63
8.4.170.0140.00619.54
8.4.160.0140.00919.57
8.4.150.0140.00919.65
8.4.140.0120.00717.81
8.4.130.0100.01017.75
8.4.120.0120.00817.85
8.4.110.0110.00917.74
8.4.100.0110.00917.83
8.4.90.0130.00617.97
8.4.80.0100.00617.92
8.4.70.0130.00717.98
8.4.60.0100.00917.94
8.4.50.0100.00817.94
8.4.40.0140.00817.82
8.4.30.0100.01017.82
8.4.20.0130.00817.76
8.4.10.0140.00617.85
8.3.310.0120.01118.42
8.3.300.0130.00818.20
8.3.290.0110.01018.32
8.3.280.0110.01018.30
8.3.270.0100.00817.27
8.3.260.0080.00617.27
8.3.250.0090.00517.27
8.3.240.0070.00617.27
8.3.230.0080.00617.27
8.3.220.0090.00417.27
8.3.210.0070.00717.27
8.3.200.0070.00617.27
8.3.190.0070.00617.27
8.3.180.0080.00517.27
8.3.170.0070.00617.27
8.3.160.0050.00817.27
8.3.150.0050.00717.27
8.3.140.0080.00517.27
8.3.130.0090.00517.27
8.3.120.0070.00517.27
8.3.110.0080.00517.27
8.3.100.0100.00917.27
8.3.90.0130.00617.27
8.3.80.0090.00817.27
8.3.70.0070.01317.27
8.3.60.0110.00617.27
8.3.50.0120.00717.27
8.3.40.0100.00918.08
8.3.30.0070.00917.96
8.3.20.0080.00518.02
8.3.10.0090.00918.03
8.3.00.0150.00517.96
8.2.310.0110.00918.15

preferences:
59.08 ms | 729 KiB | 5 Q