Return an entry from the stack without removing it

@param   integer  $n  number indicating how far back in the stack we want to look
@return  mixed
497504
public function last($n = 1) {
		if ($this->_count - $n < 0) {
			return NULL;
		}
		return $this->_stack[$this->_count - $n];
	}
526203
public function numToAlpha($n)
  {
    for ($r = ""; $n >= 0; $n = intval($n / 26) - 1) {
      $r = chr($n%26 + 0x61) . $r;
    }
    return $r;
  }
616973
public function get( $name, $default = null )
	{
		if( ( $entry = $this->object->get( $name ) ) !== null ) {
			return $entry;
		}

		return $default;
	}
765136
public function discard($n)
    {
        if ($this->length < $n) {
            throw new BufferUnderflowException();

        } elseif ($this->length === $n) {
            $this->buffer = "";
            $this->length = 0;
            return $this;

        } else {
            $this->buffer = substr($this->buffer, $n);
            $this->length -= $n;
            return $this;
        }
    }
845839
public function modInverse(self $n)
    {
        $value = gmp_invert($this->value, $n->value);
        Assertion::isInstanceOf($value, \GMP::class);

        return self::createFromGMPResource($value);
    }
1063710
public function nth( $nth = null ) {

		$this->do_hook( 'nth', $nth );

		return $this->data->nth( $nth );
	}
382266
public function remove($offset) // -> mixed
	{
		$return = null;
		
		if($this->offsetExists($offset))
		{
			if(0 === $offset)
			{
				$return = $this->shift();
			}
			else
			{
				$this->moveToOffset($offset - 1);
				
				$prev   = $this->worker;
				$pos    = $prev->next;
				$return = $pos->data;
				$last   = $offset === $this->size - 1;
				
				if($last)
				{
					$prev->next = null;
					$this->last = $prev;
				}
				else
				{
					$prev->next = $pos->next;
				}
				
				unset($pos);
				
				--$this->size;
				
				if(null !== $this->current_key)
				{
					if($this->current_key === $offset)
					{
						$this->current = $prev->next;
					}
					else if($this->current_key > $offset)
					{
						--$this->current_key;
					}
				}
			}
		}
		else
		{
			throw new OutOfRangeException('Offset invalid or out of range');
		}
		
		return $return;
	}
932005
public function getChunkPath ($n = null)
		{
			if ($n === null)
				$n = $this->_params[ 'chunkNumber' ];

			return $this->_tmpDir . '/' . $this->_params[ 'filename' ] . '.part' . $n;
		}
667233
public function paginate($n, $current = 0, $chunk = null)
    {
        // We go a page back
        --$current;

        // Variable containing the number of jump. $jump;

        if ($current <= 0) {
            $jump = 0;

            $current = 1;
        } else {
            $jump = $n * $current;
            
            $current++;
        }

        // Saving information about where
        $where = $this->where;

        $dataBind = $this->where_data_binding;

        $data = $this->jump($jump)
            ->take($n)->get();

        // Reinitialization of where
        $this->where = $where;

        $this->where_data_binding = $dataBind;

        // We count the number of pages that remain
        $restOfPage = ceil($this->count() / $n) - $current;

        // Grouped data
        if (is_int($chunk)) {
            $data = array_chunk($data, $chunk);
        }

        // Enables automatic paging.
        $data = [
            'next' => $current >= 1 && $restOfPage > 0 ? $current + 1 : false,
            'previous' => ($current - 1) <= 0 ? 1 : ($current - 1),
            'total' => (int) ($restOfPage + $current),
            'current' => $current,
            'data' => $data
        ];

        return new Collection($data);
    }
122216
protected static function array_nth(array $a, $n) {
        $keys = array_keys($a);
        if ($n < 0 or $n > count($keys) - 1) {
            return null;
        }
        $key = $keys[$n];
        return $a[$key];
    }
1341174
public function rewind($n)
    {
        $n = (int) $n;
        if ($n > $this->position) {
            throw new \InvalidArgumentException(sprintf('You try to rewind %d characters, but current position is %d',
                $n,
                $this->position
            ));
        }

        $this->position -= $n;
    }
533660
protected function getNext()
    {
        if (!$this->current)
        {
            return null;
        }
        if ($this->next !== -1)
        {
            return $this->next;
        }
        $this->load();
        for ($i = 0; $i < count($this->items); $i++)
        {
            if ($this->items[$i]->id == $this->current->id)
            {
                if ($i + 1 < count($this->items))
                {
                    $this->next = $this->items[$i + 1];
                    return $this->next;
                }
                break;
            }
        }
        return null;
    }
874973
public function read($n, $offset = 0)
    {
        if ($this->length < $offset + $n) {
            throw new BufferUnderflowException();

        } elseif ($offset === 0 && $this->length === $offset + $n) {
            return $this->buffer;

        } else {
            return substr($this->buffer, $offset, $n);
        }
    }
1313643
public function withPointMovedRight(int $n) : BigDecimal
    {
        if ($n === 0) {
            return $this;
        }

        if ($n < 0) {
            return $this->withPointMovedLeft(-$n);
        }

        $value = $this->value;
        $scale = $this->scale - $n;

        if ($scale < 0) {
            if ($value !== '0') {
                $value .= \str_repeat('0', -$scale);
            }
            $scale = 0;
        }

        return new BigDecimal($value, $scale);
    }
430537
public function get($key) {
		$entry = null;

		if (isset($this->items[$key])) {
			$entry = $this->items[$key];
		} else {
			$data = $this->store->get($key);
			if ($data) {
				$entry = unserialize($data);
			}
		}

		if (!$entry) {
			return $entry;
		}


		// if the expire time is in the future
		if ($entry->expireAt > time()) {
			return unserialize($entry->value);
		}


		// if we got to here, we need to expire the value
		$this->expire($key);
		return null;
	}
226504
public function consume($n)
    {
        if ($this->length < $n) {
            throw new BufferUnderflowException();

        } elseif ($this->length === $n) {
            $buffer = $this->buffer;
            $this->buffer = "";
            $this->length = 0;
            return $buffer;

        } else {
            $buffer = substr($this->buffer, 0, $n);
            $this->buffer = substr($this->buffer, $n);
            $this->length -= $n;
            return $buffer;
        }
    }
434103
public function getSectionOfEntry( $entry )
	{
		foreach( $this->getSections() as $section )
			if( in_array( $entry, $this->list[$section] ) )
				return $section;
		throw new InvalidArgumentException( 'Entry "'.$entry.'" not found in any Section.' );
	}