public static function replaceStringPlaceholders($text, $deletePlaceholders = false)
    {
        if (is_string($text)) {
            // Fast pre-check, to optimize performance
            if (strpos($text, "_") !== false) {
                $replaceStringPlaceholders = function ($matches) use ($deletePlaceholders) {
                    $result = "";
                    if (isset(self::$replacements[$matches[1]])) {
                        $result = self::$replacements[$matches[1]];
                        $result = str_replace(
                            ['_STRING_CSSLINEBREAK_', '_STRING_ESCAPEDDOUBLEQUOTE_', '_STRING_ESCAPEDSINGLEQUOTE_'],
                            ["\\\n", '\\"', "\\'"],
                            $result
                        );
                        if ($deletePlaceholders === true) {
                            unset(self::$replacements[$matches[1]]);
                        }
                    }
                    return $result;
                };
                $text = preg_replace_callback('/(?:_STRING_([a-f0-9]{32})_)/', $replaceStringPlaceholders, $text);
            }
            return $text;
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($text). "' for argument 'text' given."
            );
        }
    }