public function replaceValues($search, $replacement = ''): self
    {
        $array = $this->each(
            static function ($value) use ($search, $replacement) {
                return \str_replace($search, $replacement, $value);
            }
        );

        return $array;
    }
public function replaceValues($search, $replacement = ''): self
    {
        $array = $this->each(
            static function ($value) use ($search, $replacement) {
                return \str_replace($search, $replacement, $value);
            }
        );

        return $array;
    }
public function replaceValues ( $ search , $ replacement = '' ) : self { $ array = $ this -> each ( static function ( $ value ) use ( $ search , $ replacement ) { return \ str_replace ( $ search , $ replacement , $ value ) ; } ) ; return $ array ; }
Replace values in the current array.

@param mixed $search      <p>The value to replace.</p>
@param mixed $replacement <p>What to replace it with.</p>

@return static
<p>(Immutable)</p>
Replace values in the current array .