Syntax Syntax
Parameters Parameters
- $numberstring
-
(Required)
- $allowdecimal
-
(Optional)
Default value: false
- $allownegative
-
(Optional)
Default value: false
Return Return
(bool)
Source Source
File: wp-includes/ID3/module.tag.id3v2.php
/** * @param string $numberstring * @param bool $allowdecimal * @param bool $allownegative * * @return bool */ public static function IsANumber($numberstring, $allowdecimal=false, $allownegative=false) { for ($i = 0; $i < strlen($numberstring); $i++) { if ((chr($numberstring[$i]) < chr('0')) || (chr($numberstring[$i]) > chr('9'))) { if (($numberstring[$i] == '.') && $allowdecimal) { // allowed } elseif (($numberstring[$i] == '-') && $allownegative && ($i == 0)) {