| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 62 | static function bcconv($fNumber) |
||
| 63 | { |
||
| 64 | $sAppend = ''; |
||
| 65 | $iDecimals = ini_get('precision') - floor(log10(abs($fNumber))); |
||
| 66 | if (0 > $iDecimals) { |
||
| 67 | $fNumber *= pow(10, $iDecimals); |
||
| 68 | $sAppend = str_repeat('0', -$iDecimals); |
||
| 69 | $iDecimals = 0; |
||
| 70 | } |
||
| 71 | |||
| 72 | return number_format($fNumber, $iDecimals, '.', '').$sAppend; |
||
| 73 | } |
||
| 75 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.