function jalalidate_str2num in PersianTools 7
Convert string ID version of given input to int
Parameters
$input: ID in the form of string
Return value
ID in the form of int
1 call to jalalidate_str2num()
- jalalidate_verify_requirements in includes/
jalalidate_lib.inc - This function checks dependencies for using PHP's internal jalalidate. If these dependencies are not met, then the 'Date.php' file included with this module is used for converting dates to jalali calendar. This function is called when…
File
- includes/
jalalidate_lib.inc, line 113
Code
function jalalidate_str2num($input) {
if ($input == '') {
return 0;
}
$input_parts = explode('.', $input);
$version = $input_parts[0] * 10000 + $input_parts[1] * 100 + $input_parts[2];
return $version;
}