Supported Versions: PHP 5, PHP 7, PHP 8
Case-insensitive version of str_replace()
<?php str_ireplace(    array|string $search,    array|string $replace,    string|array $subject,    int &$count = null): string|array
<?php         }



        $errorsInJson = $isMultiple

            ? str_ireplace('files', $name, $errorsInJson)

            : str_ireplace('files.0', $name, $errorsInJson);



        $errors = json_decode($errorsInJson, true)['errors'];
<?php         $errorsInJson = $isMultiple

            ? str_ireplace('files', $name, $errorsInJson)

            : str_ireplace('files.0', $name, $errorsInJson);



        $errors = json_decode($errorsInJson, true)['errors'];