public static function isValidTimestamp($timestamp, $allowNegative = false)
    {
        $timestamp = (string)$timestamp;

        if ($allowNegative) {
            return ((string)(int)$timestamp === $timestamp)
                && ($timestamp <= PHP_INT_MAX)
                && ($timestamp >= self::MIN_UTC_TIME);
        }

        return ((string)(int)$timestamp === $timestamp)
            && ($timestamp <= PHP_INT_MAX)
            && ($timestamp >= 0);
    }
public static function isValidTimestamp($timestamp, $allowNegative = false)
    {
        $timestamp = (string)$timestamp;

        if ($allowNegative) {
            return ((string)(int)$timestamp === $timestamp)
                && ($timestamp <= PHP_INT_MAX)
                && ($timestamp >= self::MIN_UTC_TIME);
        }

        return ((string)(int)$timestamp === $timestamp)
            && ($timestamp <= PHP_INT_MAX)
            && ($timestamp >= 0);
    }
public static function isValidTimestamp ( $ timestamp , $ allowNegative = false ) { $ timestamp = ( string ) $ timestamp ; if ( $ allowNegative ) { return ( ( string ) ( int ) $ timestamp === $ timestamp ) && ( $ timestamp <= PHP_INT_MAX ) && ( $ timestamp >= self :: MIN_UTC_TIME ) ; } return ( ( string ) ( int ) $ timestamp === $ timestamp ) && ( $ timestamp <= PHP_INT_MAX ) && ( $ timestamp >= 0 ) ; }
Returns true if it's a valid timestamp.

@param string $timestamp
@param bool   $allowNegative

@return bool
Returns true if it s a valid timestamp .