mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-19 04:31:36 +00:00
Empty commit
This commit is contained in:
parent
89e3637145
commit
814e3b91c4
@ -5,11 +5,17 @@
|
|||||||
/**
|
/**
|
||||||
* Return true if the given string is numeric.
|
* Return true if the given string is numeric.
|
||||||
*
|
*
|
||||||
* @param string $Str
|
* @param mixed $Str
|
||||||
* @return true if $Str numeric
|
* @return bool
|
||||||
*/
|
*/
|
||||||
if (PHP_INT_SIZE === 4) {
|
if (PHP_INT_SIZE === 4) {
|
||||||
function is_number($Str) {
|
function is_number($Str) {
|
||||||
|
if ($Str === null || $Str === '') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (is_int($Str)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if ($Str[0] == '-' || $Str[0] == '+') { // Leading plus/minus signs are ok
|
if ($Str[0] == '-' || $Str[0] == '+') { // Leading plus/minus signs are ok
|
||||||
$Str[0] = 0;
|
$Str[0] = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user