PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/template_engines_bench/libs/smarty-light/src/plugins/modifier.number_format.php

https://github.com/limb-php-framework/limb-tools
PHP | 12 lines | 5 code | 0 blank | 7 comment | 0 complexity | b61c248e81d4e43129a0572f6fb9d592 MD5 | raw file
Possible License(s): AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * Smarty-Light number_format modifier plugin
  4. *
  5. * Type: modifier
  6. * Name: number_format
  7. * Purpose: Wrapper for the PHP 'number_format' function
  8. */
  9. function tpl_modifier_number_format($string, $decimals = 0, $decimal_point = '.', $thousands_sep = ',') {
  10. return number_format($string, $decimals, $decimal_point, $thousands_sep);
  11. }
  12. ?>