strtolower

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Make a string lowercase
<?php strtolower(string $string): string
<?php     public function extensionIsOneOf($filetypes = [])

    {

        return in_array(strtolower($this->extension()), $filetypes);

    }
<?php     public function guessedExtensionIsOneOf($filetypes = [])

    {

        return in_array(strtolower($this->guessedExtension()), $filetypes);

    }



    public function __toString()
<?php     public function gravatar($email, $size = null)

    {

        $url = 'https://www.gravatar.com/avatar/'.e(md5(strtolower($email)));



        if ($size) {

            $url .= '?s='.$size;
<?php     public function isImage($path)

    {

        return in_array(

            strtolower($this->extension($path)),

            ['jpg', 'jpeg', 'png', 'gif']

        );

    }
<?php             'container' => 'required',

            'folder' => 'required',

            'file' => ['file', function ($attribute, $value, $fail) {

                if (in_array(trim(strtolower($value->getClientOriginalExtension())), ['php', 'php3', 'php4', 'php5', 'phtml'])) {

                    $fail(__('validation.uploaded'));

                }

            }],
<?php             ]);

        }



        $path = strtolower($path); // Prevent case sensitivity collisions



        return $container->assetFolder($path)->save();

    }
<?php     protected function credentials(Request $request)

    {

        $credentials = [

            $this->username() => strtolower($request->get($this->username())),

            'password' => $request->get('password'),

        ];
<?php                     return $value && is_string($value);

                })

                ->filter(function ($value) {

                    return Str::contains(strtolower($value), strtolower($this->request->search));

                })

                ->isNotEmpty();

        })->values();
<?php     protected function camelToWords($name)

    {

        $label = strtolower(trim(str_replace([

            '-',

            '_',

            '.',

        ], ' ', preg_replace('/(?<![A-Z])[A-Z]/', ' \0', $name))));



        return $label;

    }
<?php     public function sort($value, $params)

    {

        $key = Arr::get($params, 0, 'true');

        $desc = strtolower(Arr::get($params, 1)) == 'desc';



        $value = $value instanceof Collection ? $value : collect($value);
<?php     protected function invalidOperator($operator)

    {

        return ! in_array(strtolower($operator), array_keys($this->operators), true);

    }



    public function whereIn($column, $values)
<?php     protected function filterTestEquals($item, $value)

    {

        return strtolower($item) === strtolower($value);

    }



    protected function filterTestNotEquals($item, $value)
<?php     protected function filterTestNotEquals($item, $value)

    {

        if (is_string($item)) {

            return strtolower($item) !== strtolower($value);

        }



        return $item !== $value;
<?php             ->filter()

            ->implode(', ');



        return strtolower($this->title()).': '.$valuesSummary;

    }



    public function toArray()
<?php         $translatedOperator = Arr::get($this->fieldItems(), "operator.options.{$operator}");

        $value = $values['value'];



        return $field.' '.strtolower($translatedOperator).' '.$value;

    }

}