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

$first = head($array);
<?php         $this->registerComponentForNextTest($classes);



        $url = '/livewire-dusk/'.urlencode(head($classes)).$queryString;



        return $browser->visit($url)->waitForLivewireToLoad();

    }
<?php     static function beforeFirstDot($subject)

    {

        return head(explode('.', $subject));

    }



    static function afterFirstDot($subject) : string
<?php     static function provide()

    {

        ComponentAttributeBag::macro('wire', function ($name) {

            $entries = head((array) $this->whereStartsWith('wire:'.$name));



            $directive = head(array_keys($entries));

            $value = head(array_values($entries));
<?php         ComponentAttributeBag::macro('wire', function ($name) {

            $entries = head((array) $this->whereStartsWith('wire:'.$name));



            $directive = head(array_keys($entries));

            $value = head(array_values($entries));



            return new WireDirective($name, $directive, $value);
<?php             $entries = head((array) $this->whereStartsWith('wire:'.$name));



            $directive = head(array_keys($entries));

            $value = head(array_values($entries));



            return new WireDirective($name, $directive, $value);

        });
<?php     public function extractOriginalNameFromFilePath($path)

    {

        return base64_decode(head(explode('-', last(explode('-meta', str($path)->replace('_', '/'))))));

    }



    public static function createFromLivewire($filePath)
<?php     {

        return function ($js, $expects = true) {


            PHPUnit::assertEquals($expects, head($this->script(

                str($js)->start('return ')

            )));



            return $this;

        };
<?php             } else {



                $rule = head(array_values($rules));




                $rule = (string) str($rule)->before(':');