function Kint_Parsers_Timestamp::_fits
1 call to Kint_Parsers_Timestamp::_fits()
- Kint_Parsers_Timestamp::_parse in kint/
kint/ parsers/ custom/ timestamp.php - * main and usually single method a custom parser must implement * *
File
-
kint/
kint/ parsers/ custom/ timestamp.php, line 5
Class
Code
private static function _fits($variable) {
if (!is_string($variable) && !is_int($variable)) {
return false;
}
$len = strlen((int) $variable);
return ($len === 9 || $len === 10 || $len === 13 && substr($variable, -3) === '000') && (string) (int) $variable == $variable;
}