The head function returns the first element in the given array:
<?php $array = [100, 200, 300];

$first = head($array);
<?php     protected function flattenValue($value)

    {

        return is_array($value) ? head(Arr::flatten($value)) : $value;

    }
<?php         $column = $this->wrap($having['column']);



        $min = $this->parameter(head($having['values']));



        $max = $this->parameter(last($having['values']));
<?php             }



            if (str_starts_with($value, '--env')) {

                return head(array_slice(explode('=', $value), 1));

            }

        }

    }
<?php     protected function middlewareNames($middleware)

    {

        $stripped = head(explode(':', $middleware));



        yield $stripped;
<?php     protected function mergeRulesForAttribute($results, $attribute, $rules)

    {

        $merge = head($this->explodeRules([$rules]));



        $results[$attribute] = array_merge(

            isset($results[$attribute]) ? $this->explodeExplicitRule($results[$attribute], $attribute) : [], $merge
<?php     public function testHead()

    {

        $array = ['a', 'b', 'c'];

        $this->assertSame('a', head($array));

    }



    public function testLast()