3v4l.org

run code in 300+ PHP versions simultaneously
<?php // suppose: $pri['base'] = 30000; $pri['com'] = 5000; // then $mst_per_off_base = bcmul($pri['base'],.01); // calculate 1% of the base price $gr[] = bcsub($pri['com'],$mst_per_off_base); // deduct the 1% off of the com echo array_sum($gr); // total of all after deduction

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
155.02 ms | 2538 KiB | 11 Q