str_replace

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

    {

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

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

    }



    public static function 
generateTestPathFromNamespace($namespace)
    public static function getName()

    {

        
$namespace collect(explode('.'str_replace(['/''\\'], '.'config('livewire.class_namespace'))))

            ->
map([Str::class, 'kebab'])

            ->
implode('.');
            ->map([Str::class, 'kebab'])

            ->
implode('.');



        
$fullName collect(explode('.'str_replace(['/''\\'], '.', static::class)))

            ->
map([Str::class, 'kebab'])

            ->
implode('.');
    public function __get($property)

    {

        
$studlyProperty str_replace(' '''ucwords(str_replace(['-''_'], ' '$property)));



        if (
method_exists($this$computedMethodName 'get'.$studlyProperty.'Property')) {

            if (isset(
$this->computedPropertyCache[$property])) {
        });




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

    }

}
            $studlyProperty str_replace(' '''ucwords(str_replace(['-''_'], ' '$property)));

            
$method 'hydrate'.$studlyProperty;

            
$instance->{$method}($value$request);

        }
        $publicProperties $instance->getPublicPropertiesDefinedBySubClass();



        foreach (
$publicProperties as $property => $value) {

            
$studlyProperty str_replace(' '''ucwords(str_replace(['-''_'], ' '$property)));

            
$method 'dehydrate'.$studlyProperty;

            
$instance->{$method}($value$response);
        ];



        
$outputFileStr $uploader->dehydratePropertyFromWithFileUploads($tmpFileArray);

        
$imageListArr explode(','str_replace(['livewire-files:''[' ']'],  ''$outputFileStr));



        
$this->assertTrue(str_contains($outputFileStr'livewire-files:'));

        
$this->assertTrue(count($imageListArr) === count($tmpFileArray));
        $wireableInput = new DehydrateTestWireable($tmpFile$tmpFileArray'test string'1);



        
$wireableOutput $uploader->dehydratePropertyFromWithFileUploads($wireableInput);

        
$imageListArr explode(','str_replace(['livewire-files:','['']'], ''$wireableOutput->imageList));



        
$this->assertTrue(str_contains($wireableOutput->image'livewire-file:'));

        
$this->assertTrue(str_contains($wireableOutput->imageList'livewire-files:'));
        $outputUploadedFiles $uploader->dehydratePropertyFromWithFileUploads($uploadedFiles);

        
$uploadedFilesList explode(','str_replace(['livewire-files:''['']'], ''$outputUploadedFiles));

        
$this->assertTrue(str_contains($outputUploadedFiles'livewire-files:'));

        
$this->assertTrue(count($uploadedFilesList) === count($uploadedFiles));
    private function normalizeDirectories($subject)

    {

        return 
str_replace(DIRECTORY_SEPARATOR'/'$subject);

    }

}
            return Arr::wrap(call_user_func($this->guessPolicyNamesUsingCallback$class));

        }



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



        
$classDirnameSegments explode('\\'$classDirname);
    public function auth($request)

    {

        
$channelName $this->normalizeChannelName(

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

        );



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

    {

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



        return 
$id;

    }
    {

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



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



        
$rootNamespace $this->rootNamespace();