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             return Arr::wrap(call_user_func($this->guessPolicyNamesUsingCallback, $class));

        }



        $classDirname = str_replace('/', '\\', dirname(str_replace('\\', '/', $class)));



        $classDirnameSegments = explode('\\', $classDirname);
<?php     public function auth($request)

    {

        $channelName = $this->normalizeChannelName(

            str_replace($this->prefix, '', $request->channel_name)

        );



        if (empty($request->channel_name) ||
<?php     public function resetTag($name)

    {

        $this->store->forever($this->tagKey($name), $id = str_replace('.', '', uniqid('', true)));



        return $id;

    }
<?php         }



        if (windows_os()) {

            $path = str_replace('/', '\\', $path);

        }



        $this->components->info(sprintf('%s [%s] created successfully.', $info, $path));
<?php     {

        $name = ltrim($name, '\\/');



        $name = str_replace('/', '\\', $name);



        $rootNamespace = $this->rootNamespace();
<?php     {

        $model = ltrim($model, '\\/');



        $model = str_replace('/', '\\', $model);



        $rootNamespace = $this->rootNamespace();
<?php     {

        $name = Str::replaceFirst($this->rootNamespace(), '', $name);



        return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'.php';

    }
<?php         ];



        foreach ($searches as $search) {

            $stub = str_replace(

                $search,

                [$this->getNamespace($name), $this->rootNamespace(), $this->userProviderModel()],

                $stub

            );

        }



        return $this;
<?php     protected function replaceClass($stub, $name)

    {

        $class = str_replace($this->getNamespace($name).'\\', '', $name);



        return str_replace(['DummyClass', '{{ class }}', '{{class}}'], $class, $stub);

    }
<?php     {

        $class = str_replace($this->getNamespace($name).'\\', '', $name);



        return str_replace(['DummyClass', '{{ class }}', '{{class}}'], $class, $stub);

    }
<?php             sort($imports);



            return str_replace(trim($match['imports']), implode("\n", $imports), $stub);

        }



        return $stub;
<?php     protected function replaceMigrationPlaceholders($path, $table)

    {

        $stub = str_replace(

            '{{table}}', $table, $this->files->get($this->migrationStubFile())

        );



        $this->files->put($path, $stub);

    }
<?php         $description = $event->description ?? '';



        if (! $this->output->isVerbose()) {

            $command = str_replace([Application::phpBinary(), Application::artisanBinary()], [

                'php',

                preg_replace("#['\"]#", '', Application::artisanBinary()),

            ], $command);

        }



        if ($event instanceof CallbackEvent) {
<?php             return sprintf(

                '%s:%s',

                str_replace($this->laravel->basePath().DIRECTORY_SEPARATOR, '', $function->getFileName() ?: ''),

                $function->getStartLine()

            );

        }
<?php         $command = $event instanceof CallbackEvent

            ? $summary

            : trim(str_replace($this->phpBinary, '', $event->command));



        $description = sprintf(

            '<fg=gray>%s</> Running [%s]%s',