Pops an element off the end of the collection

@return mixed The popped element
335806
public function pop()
    {
        if (0 === $this->count()) {
            return null;
        }

        $array = $this->getArrayCopy();
        $ret = array_pop($array);
        $this->exchangeArray($array);

        return $ret;
    }
140027
private function _break() {
    $node = new BreakStatementNode();
    $this->mustMatch(T_BREAK, $node);
    if ($this->tryMatch(';', $node, NULL, TRUE, TRUE) || $this->currentType === T_CLOSE_TAG) {
      return $node;
    }
    $this->parseLevel($node);
    $this->endStatement($node);
    return $node;
  }
1138811
protected function pop(): \Generator
    {
        if ($this->closed) {
            throw new \Error("The pool has been closed");
        }

        while ($this->promise !== null && $this->connections->count() + $this->pending >= $this->getConnectionLimit()) {
            yield $this->promise; // Prevent simultaneous connection creation when connection count is at maximum - 1.
        }

        do {
            // While loop to ensure an idle connection is available after promises below are resolved.
            while ($this->idle->isEmpty()) {
                if ($this->connections->count() + $this->pending < $this->getConnectionLimit()) {
                    // Max connection count has not been reached, so open another connection.
                    ++$this->pending;
                    try {
                        $connection = yield $this->connector->connect($this->connectionConfig);
                        if (!$connection instanceof Link) {
                            throw new \Error(\sprintf(
                                "%s::connect() must resolve to an instance of %s",
                                \get_class($this->connector),
                                Link::class
                            ));
                        }
                    } finally {
                        --$this->pending;
                    }

                    $this->connections->attach($connection);
                    return $connection;
                }

                // All possible connections busy, so wait until one becomes available.
                try {
                    $this->deferred = new Deferred;
                    // May be resolved with defunct connection, but that connection will not be added to $this->idle.
                    yield $this->promise = $this->deferred->promise();
                } finally {
                    $this->deferred = null;
                    $this->promise = null;
                }
            }

            $connection = $this->idle->shift();
            \assert($connection instanceof Link);

            if ($connection->isAlive()) {
                return $connection;
            }

            $this->connections->detach($connection);
        } while (!$this->closed);

        throw new FailureException("Pool closed before an active connection could be obtained");
    }
1108653
function end()
    {
        $data = ob_get_contents();
        ob_end_clean();
        $id = array_pop($this->nestedIds);
        $group = array_pop($this->nestedGroups);
        $this->save($data, $id, $group);
		return $data;
    }
571161
function destroy(){
		while( $Child = $this->pop() ){
			$Child->destroy();
		}	
		$Parent = $this->get_parent() and $Parent->remove( $this );
		unset( self::$reg[$this->idx] );
		$this->idx = null;
		return $Parent;
	}
1166163
@Override
    public N pop() {
        try {
            return stack[(--stackTop)&mask];
        } finally {
            // remove the reference to the element in the
            // stack to prevent hanging references from living forever
            stack[(stackTop&mask)] = null;
        }
    }
721908
public function pop() {
    $items = $this->getItems();
    if ($items->isEmpty()) {
      return NULL;
    }
    if (count($items) === 1) {
      $pop_item = $items[0];
      $pop_item->remove();
      return $pop_item;
    }
    $pop_item = $items[count($items) - 1];
    $pop_item->previousUntil(function ($node) {
      if ($node instanceof HiddenNode) {
        return FALSE;
      }
      if ($node instanceof TokenNode && $node->getType() === ',') {
        return FALSE;
      }
      return TRUE;
    })->remove();
    $pop_item->remove();
    return $pop_item;
  }
198101
public E pop() {
        StackNode<E> oldTop, newTop;

        while (true) {
            oldTop = top.get();
            if (oldTop == null)
                return null;
            newTop = oldTop.next;
            if (top.compareAndSet(oldTop, newTop))
                break;
        }

        return oldTop.data;
    }
1280872
public function popState()
		{
		$r = array_pop($this->states);
		$this->state = $this->states[count($this->states) - 1];
		return $r;
		}
672144
protected function popResult()
    {
        $result = $this->result;
        $this->result = array_pop($this->resultStack);
        return $result;
    }
736196
protected function pop()
    {
        $old = $this->env;
        $this->env = $this->env->parent;

        return $old;
    }
1360219
public function pop()
    {
        if (!$this->count()) {
            return null;
        }

        $task = $this->getQueue()->dequeue();

        return $this->unserializeTask($task, '');
    }
652492
public function shift()
    {
        $this->forceCollection();
        if (!$this->hasItems()) {
            throw new InvalidOffsetException('Cannot shift this array, no more items');
        }

        return $this->box(array_shift($this->data));
    }
1025775
@Override
	public synchronized IPOContext pop()
	{

		IPOContext obj = peek();
		int len = size();
		for (int i = len - 1; i >= 0; i--)
		{
			if (!this.get(i).isStateful())
			{
				removeElementAt(i);
				return obj;
			}
		}

		return obj;
	}
1328106
final Object pop() {
        int size = stack.size();
        return size == 0 ? null : stack.remove(size - 1);
    }
551347
public function getTo()
    {
        if ($this->getExclusive()) {
            $values = range($this->from, $this->to);
            array_pop($values);

            return end($values);
        }

        return $this->to;
    }
309180
public function pop() {
		$this->release_reserved();

		$sql = $this->database->prepare( "
			SELECT * FROM {$this->jobs_table}
			WHERE reserved_at IS NULL
			AND available_at <= %s
			ORDER BY available_at
			LIMIT 1
		", $this->datetime() );

		$raw_job = $this->database->get_row( $sql );

		if ( is_null( $raw_job ) ) {
			return false;
		}

		$job = $this->vitalize_job( $raw_job );

		$this->reserve( $job );

		return $job;
	}