strtolower

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Make a string lowercase
<?php strtolower(string $string): string
<?php         throw new ExpectationFailedException(sprintf(

            'Expecting %s not %s %s.',

            $toString($this->original->value),

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

            implode(' ', array_map(fn (mixed $argument): string => $toString($argument), $arguments)),

        ));

    }
<?php     {

        if ('\\' === DIRECTORY_SEPARATOR) {


            $filename = (string) preg_replace_callback('~^(?P<drive>[a-z]+:\\\)~i', static fn (array $match): string => strtolower($match['drive']), $filename);

        }



        $filename = str_replace('\\\\', '\\', addslashes((string) realpath($filename)));
<?php             $startChar = DIRECTORY_SEPARATOR;



            if ('\\' === DIRECTORY_SEPARATOR || preg_match('~\A[A-Z]:(?![^/\\\\])~i', $path) > 0) {

                $path = (string) preg_replace_callback('~^(?P<drive>[a-z]+:\\\)~i', fn (array $match): string => strtolower($match['drive']), $path);



                $startChar = strtolower((string) preg_replace('~^([a-z]+:\\\).*$~i', '$1', __DIR__));

            }
<?php             if ('\\' === DIRECTORY_SEPARATOR || preg_match('~\A[A-Z]:(?![^/\\\\])~i', $path) > 0) {

                $path = (string) preg_replace_callback('~^(?P<drive>[a-z]+:\\\)~i', fn (array $match): string => strtolower($match['drive']), $path);



                $startChar = strtolower((string) preg_replace('~^([a-z]+:\\\).*$~i', '$1', __DIR__));

            }



            return str_starts_with($path, $startChar)