src/Carbon/CarbonPeriod.php
protected static function intervalHasTime(DateInterval $interval)
    {
        // The array_key_exists and get_object_vars are used as a workaround to check microsecond support.
        // Both isset and property_exists will fail on PHP 7.0.14 - 7.0.21 due to the following bug:
        // https://bugs.php.net/bug.php?id=74852
        return $interval->h || $interval->i || $interval->s || array_key_exists('f', get_object_vars($interval)) && $interval->f;
    }
protected static function intervalHasTime(DateInterval $interval)
    {
        // The array_key_exists and get_object_vars are used as a workaround to check microsecond support.
        // Both isset and property_exists will fail on PHP 7.0.14 - 7.0.21 due to the following bug:
        // https://bugs.php.net/bug.php?id=74852
        return $interval->h || $interval->i || $interval->s || array_key_exists('f', get_object_vars($interval)) && $interval->f;
    }
protected static function intervalHasTime ( DateInterval $ interval ) { // The array_key_exists and get_object_vars are used as a workaround to check microsecond support. // Both isset and property_exists will fail on PHP 7.0.14 - 7.0.21 due to the following bug: // https://bugs.php.net/bug.php?id=74852 return $ interval -> h || $ interval -> i || $ interval -> s || array_key_exists ( 'f' , get_object_vars ( $ interval ) ) && $ interval -> f ; }
Return whether given interval contains non zero value of any time unit.

@param \DateInterval $interval

@return bool
Return whether given interval contains non zero value of any time unit .