src/Memcached.php
protected function ttlToMemcachedTime($ttl)
    {
        $seconds = $this->ttlToSeconds($ttl);

        if ($seconds <= 0) {
            return isset($seconds) ? false : 0;
        }

        /* 2592000 seconds = 30 days */
        return $seconds <= 2592000 ? $seconds : $this->ttlToTimestamp($ttl);
    }
protected function ttlToMemcachedTime($ttl)
    {
        $seconds = $this->ttlToSeconds($ttl);

        if ($seconds <= 0) {
            return isset($seconds) ? false : 0;
        }

        /* 2592000 seconds = 30 days */
        return $seconds <= 2592000 ? $seconds : $this->ttlToTimestamp($ttl);
    }
protected function ttlToMemcachedTime ( $ ttl ) { $ seconds = $ this -> ttlToSeconds ( $ ttl ) ; if ( $ seconds <= 0 ) { return isset ( $ seconds ) ? false : 0 ; } /* 2592000 seconds = 30 days */ return $ seconds <= 2592000 ? $ seconds : $ this -> ttlToTimestamp ( $ ttl ) ; }
Convert ttl to timestamp or seconds.

@see http://php.net/manual/en/memcached.expiration.php

@param null|int|DateInterval $ttl
@return int|null
@throws InvalidArgumentException
Convert ttl to timestamp or seconds .