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
            return false;

        }



        return 
base64_encode(base64_decode($this->data)) === str_replace(["\n""\r"], ''$this->data);

    }
        }



        
$pattern "/^data:(?:image\/[a-zA-Z\-\.]+)(?:charset=\".+\")?;base64,(?P<data>.+)$/";

        
preg_match($patternstr_replace(["\n""\r"], ''$data_url), $matches);



        if (
is_array($matches) && array_key_exists('data'$matches)) {

            return 
base64_decode($matches['data']);
                    foreach ($config->get('imagecache::paths') as $path) {


                        
$image_path $path.'/'.str_replace('..'''$filename);

                        if (
file_exists($image_path) && is_file($image_path)) {

                            break;

                        } else {