/addons/DynamicMTML.pack/php/tags/modifier.intval.php
PHP | 7 lines | 7 code | 0 blank | 0 comment | 1 complexity | c5dff2586475acbb50387a85bc3b0746 MD5 | raw file
Possible License(s): MIT, GPL-2.0
- <?php
- function smarty_modifier_intval( $text, $arg ) {
- $val = intval( trim( $text ) );
- if (! $val ) $val = 0;
- return $val;
- }
- ?>