- round: documentation ( source)
- print_r: documentation ( source)
- str_pad: documentation ( source)
<?php
$a = 4121.57;
$b = 3998;
$c = 123.57;
$d = round( $a - $b - $c, 2);
$e = round( $d, 2 );
echo "\n";
echo str_pad(print_r($d,TRUE),4,' ')." // NEGATIVE ZERO?"."\n";
echo str_pad(print_r($e,TRUE),4,' ')." // Don't worry, it rounds to zero! -_-"."\n";