public static function convertFromNestedBase64($value)
    {
        $matches = array();
        preg_match_all('/(?:^|[,&?])\s*([a-z0-9]{50,}=*)(?:\W|$)/im', $value, $matches);

        foreach ($matches[1] as $item) {
            if (isset($item) && !preg_match('/[a-f0-9]{32}/i', $item)) {
                $base64_item = base64_decode($item);
                $value = str_replace($item, $base64_item, $value);
            }
        }

        return $value;
    }
public static function convertFromNestedBase64($value)
    {
        $matches = array();
        preg_match_all('/(?:^|[,&?])\s*([a-z0-9]{50,}=*)(?:\W|$)/im', $value, $matches);

        foreach ($matches[1] as $item) {
            if (isset($item) && !preg_match('/[a-f0-9]{32}/i', $item)) {
                $base64_item = base64_decode($item);
                $value = str_replace($item, $base64_item, $value);
            }
        }

        return $value;
    }
public static function convertFromNestedBase64 ( $ value ) { $ matches = array ( ) ; preg_match_all ( '/(?:^|[,&?])\s*([a-z0-9]{50,}=*)(?:\W|$)/im' , $ value , $ matches ) ; foreach ( $ matches [ 1 ] as $ item ) { if ( isset ( $ item ) && ! preg_match ( '/[a-f0-9]{32}/i' , $ item ) ) { $ base64_item = base64_decode ( $ item ) ; $ value = str_replace ( $ item , $ base64_item , $ value ) ; } } return $ value ; }
This method matches and translates base64 strings and fragments
used in data URIs

@param string $value the value to convert

@static
@return string
This method matches and translates base64 strings and fragments used in data URIs