array_shift

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Shift an element off the beginning of array
<?php array_shift(array &$array): mixed
<?php         foreach (Folder::disk('resources')->getFilesByTypeRecursively('templates', 'html') as $path) {

            $parts = explode('/', $path);

            array_shift($parts);

            $templates[] = Str::removeRight(implode('/', $parts), '.html');

        }
<?php         $segments[0] = '/';



        if (! $this->params->bool('include_home', true)) {

            array_shift($segments);

        }



        $crumbs = collect($segments)->map(function () use (&$segments) {
<?php     protected function unpackModifier($modifier)

    {

        $parts = explode(':', $modifier);

        $modifier = array_shift($parts);



        return [$modifier, $parts];

    }