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
        $encoded_uri str_replace('%2F''/'rawurlencode($canonical_uri));




        if (
$AWSRegion == 'us-east-1') {
    private static function updateComposerAutoloading(): void

    
{

        
$updatedStaticLoader str_replace(

            
"__DIR__ . '/../..'",

            
sprintf("'%s'"rtrim(getenv('LAMBDA_TASK_ROOT'), '/')),

            
file_get_contents(self::AUTOLOAD_STATIC_PATH)

        );



        
file_put_contents(self::AUTOLOAD_STATIC_PATH$updatedStaticLoader);

    }
        $encoded_uri str_replace('%2F''/'rawurlencode($canonical_uri));




        if (
$AWSRegion == 'us-east-1') {
    private static function updateComposerAutoloading(): void

    
{

        
$updatedStaticLoader str_replace(

            
"__DIR__ . '/../..'",

            
sprintf("'%s'"rtrim(getenv('LAMBDA_TASK_ROOT'), '/')),

            
file_get_contents(self::AUTOLOAD_STATIC_PATH)

        );



        
file_put_contents(self::AUTOLOAD_STATIC_PATH$updatedStaticLoader);

    }
        $encoded_uri str_replace('%2F''/'rawurlencode($canonical_uri));




        if (
$AWSRegion == 'us-east-1') {
    private static function updateComposerAutoloading(): void

    
{

        
$updatedStaticLoader str_replace(

            
"__DIR__ . '/../..'",

            
sprintf("'%s'"rtrim(getenv('LAMBDA_TASK_ROOT'), '/')),

            
file_get_contents(self::AUTOLOAD_STATIC_PATH)

        );



        
file_put_contents(self::AUTOLOAD_STATIC_PATH$updatedStaticLoader);

    }
        $template file_get_contents("$rootPath/serverless.yml");



        
$template str_replace('PHP_VERSION'PHP_MAJOR_VERSION PHP_MINOR_VERSION$template);



        
file_put_contents('serverless.yml'$template);
        }

        foreach (
$event->getHeaders() as $header => $values) {

            foreach (
$values as $value) {

                
$key 'HTTP_' strtoupper(str_replace('-''_'$header));

                
$request->setCustomVar($key$value);

            }

        }
    private function capitalizeHeaderName(string $name): string

    
{

        
$name str_replace('-'' '$name);

        
$name ucwords($name);

        return 
str_replace(' ''-'$name);

    }
    {

        
$name str_replace('-'' '$name);

        
$name ucwords($name);

        return 
str_replace(' ''-'$name);

    }

}