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);
<?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();