Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Replace all occurrences of the search string with the replacement string
<?php str_replace(    array|string $search,    array|string $replace,    string|array $subject,    int &$count = null): string|array
<?php     public static function generatePathFromNamespace($namespace)

    {

        $name = str($namespace)->finish('\\')->replaceFirst(app()->getNamespace(), '');

        return app('path').'/'.str_replace('\\', '/', $name);

    }



    public static function generateTestPathFromNamespace($namespace)
<?php                 $console->line('Setting the default namespace to "App\\Http\\Livewire"...');



                $config = $this->filesystem()->get('config/livewire.php');

                $config = str_replace('App\\\\Livewire', 'App\\\\Http\\\\Livewire', $config);

                $this->filesystem()->put('config/livewire.php', $config);



                return $next($console);
<?php     private function normalizeDirectories($subject)

    {

        return str_replace(DIRECTORY_SEPARATOR, '/', $subject);

    }

}
<?php         });




        return $fileHashPaths->map(function ($path) { return str_replace(FileUploadConfiguration::path('/'), '', $path); });

    }

}
<?php                 'wire:snapshot="', '"'

            );



            $html = str_replace($removeMe, '', $html);



            $removeMe = (string) str($html)->betweenFirst(

                'wire:effects="', '"'
<?php                 'wire:effects="', '"'

            );



            $html = str_replace($removeMe, '', $html);

        }



        return $html;
<?php     protected function generateNameFromClass($class)

    {

        $namespace = str_replace(

            ['/', '\\'],

            '.',

            trim(trim(config('livewire.class_namespace')), '\\')

        );



        $class = str_replace(

            ['/', '\\'],
<?php             trim(trim(config('livewire.class_namespace')), '\\')

        );



        $class = str_replace(

            ['/', '\\'],

            '.',

            trim(trim($class, '/'), '\\')

        );



        $namespace = collect(explode('.', $namespace))

            ->map(fn ($i) => \Illuminate\Support\Str::kebab($i))
<?php         $serverBag->set(

            'REQUEST_URI',

            str_replace($currentPath, $originalPath, $serverBag->get('REQUEST_URI'))

        );



        $serverBag->set('REQUEST_METHOD', $originalMethod);