- bcsub: documentation ( source)
- var_dump: documentation ( source)
- explode: documentation ( source)
<?php
$str = "4141.58000-3878.96000-262.62000";
$nums = explode("-",$str);
$op1 = $nums[0] - $nums[1] - $nums[2];
var_dump($op1);
$bc = bcsub((float)$nums[0],(float)$nums[1]);
$bc = bcsub($bc,(float)$nums[2]);
var_dump($bc);