Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Pop the element off the end of array
<?php array_pop(array &$array): mixed
<?php             return end($array);

        }



        $finalItem = array_pop($array);



        return implode($glue, $array).$finalGlue.$finalItem;

    }
<?php     public function pop($count = 1)

    {

        if ($count === 1) {

            return array_pop($this->items);

        }



        if ($this->isEmpty()) {
<?php         $collectionCount = $this->count();



        foreach (range(1, min($count, $collectionCount)) as $item) {

            array_push($results, array_pop($this->items));

        }



        return new static($results);
<?php         $this->registry->register($signal, $callback);



        with($this->getHandlers(), function ($handlers) use ($signal) {

            $lastHandlerInserted = array_pop($handlers[$signal]);



            array_unshift($handlers[$signal], $lastHandlerInserted);
<?php         $result = BoundMethod::call($this, $callback, $parameters, $defaultMethod);



        if ($pushedToBuildStack) {

            array_pop($this->buildStack);

        }



        return $result;
<?php         $this->resolved[$abstract] = true;



        array_pop($this->with);



        return $object;

    }
<?php         if (is_null($constructor)) {

            array_pop($this->buildStack);



            return new $concrete;

        }
<?php         try {

            $instances = $this->resolveDependencies($dependencies);

        } catch (BindingResolutionException $e) {

            array_pop($this->buildStack);



            throw $e;

        }
<?php             throw $e;

        }



        array_pop($this->buildStack);



        return $reflector->newInstanceArgs($instances);

    }
<?php         catch (BindingResolutionException $e) {

            if ($parameter->isDefaultValueAvailable()) {

                array_pop($this->with);



                return $parameter->getDefaultValue();

            }
<?php             }



            if ($parameter->isVariadic()) {

                array_pop($this->with);



                return [];

            }
<?php         if (! $table) {

            $words = preg_split('/(_)/u', $name, -1, PREG_SPLIT_DELIM_CAPTURE);



            $lastWord = array_pop($words);



            $table = implode('', $words).Str::plural($lastWord);

        }
<?php     {

        $segments = explode('->', $column);



        $lastSegment = array_pop($segments);



        if (filter_var($lastSegment, FILTER_VALIDATE_INT) !== false) {

            $i = $lastSegment;
<?php         $wrappedPath = $this->wrapJsonPathAttributes($path);



        $attribute = array_pop($wrappedPath);



        if (! empty($wrappedPath)) {

            return $field.'->'.implode('->', $wrappedPath).'->>'.$attribute;
<?php     {

        $segments = explode('->', $column);



        $lastSegment = array_pop($segments);



        if (preg_match('/\[([0-9]+)\]$/', $lastSegment, $matches)) {

            $segments[] = Str::beforeLast($lastSegment, $matches[0]);