3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userPercentage = 0.1 * 0.1; // 10% $total = 100; $userShare = $userPercentage * $total; // 0.05 * 100 = 10 echo "$userShare\n"; $new_total = $userShare * 10; // 10 being the amount of users. This totals $100. echo "$new_total\n"; $userPercentage = 0.1 * 0.3; // 30% $total = 100; $userShare = $userPercentage * $total; // 0.3 * 100 = 30 echo "$userShare\n"; $new_total = $userShare * 10; // 10 being the amount of users. This totals $300. echo "$new_total\n"; $userPercentage = 0.1 * 0.6; // 60% $total = 100; $userShare = $userPercentage * $total; // 0.6 * 100 = 60 echo "$userShare\n"; $new_total = $userShare * 10; // 10 being the amount of users. This totals $600. echo "$new_total\n";

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
163.82 ms | 2547 KiB | 10 Q