/var/www/html/manqanebi.ge/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php
// If the class has a test now set and we are trying to create a now()
// instance then override as required
$isNow = empty($time) || $time === 'now';
if (method_exists(static::class, 'hasTestNow') &&
method_exists(static::class, 'getTestNow') &&
static::hasTestNow() &&
($isNow || static::hasRelativeKeywords($time))
) {
static::mockConstructorParameters($time, $tz);
}
// Work-around for PHP bug https://bugs.php.net/bug.php?id=67127
if (strpos((string) .1, '.') === false) {
$locale = setlocale(LC_NUMERIC, '0');
setlocale(LC_NUMERIC, 'C');
}
try {
parent::__construct($time ?: 'now', static::safeCreateDateTimeZone($tz) ?: null);
} catch (Exception $exception) {
throw new InvalidFormatException($exception->getMessage(), 0, $exception);
}
$this->constructedObjectId = spl_object_hash($this);
if (isset($locale)) {
setlocale(LC_NUMERIC, $locale);
}
static::setLastErrors(parent::getLastErrors());
}
/**
* Get timezone from a datetime instance.
*
* @param DateTimeInterface $date
* @param DateTimeZone|string|null $tz
*
* @return DateTimeInterface
Arguments
"Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes)"