addcslashes

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Quote string with slashes in a C style
addcslashes(string $stringstring $characters): string
        $value str_replace("'""''"$value);



        return 
"'" addcslashes($value"\000\n\r\\\032") . "'";

    }



    public function 
exec(string $sql): int
    {

        return 
preg_replace(

            
'~([' preg_quote($this->getLikeWildcardCharacters() . $escapeChar'~') . '])~u',

            
addcslashes($escapeChar'\\') . '$1',

            
$inputString

        
);

    }
            $loopedText $associative $parses->first() : $parses->implode('');




            
$text $this->preg_replace('/'.preg_quote($match[0][0], '/').'/m'addcslashes($loopedText'\\$'), $text1);

        }



        return 
$text;
                $replacement $this->valueToLiteral($replacement);

            }



            
$text $this->preg_replace('/'.preg_quote($tag'/').'/m'addcslashes($replacement'\\$'), $text1);

            
$text $this->injectExtractions($text'nested_tag_pair');

        }
            $conditional .= ': ?>';



            
$text $this->preg_replace('/'.preg_quote($match[0], '/').'/m'addcslashes($conditional'\\$'), $text1);

        }



        
$text $this->preg_replace($this->conditionalElseRegex'<?php else: ?>'$text);
                $links Preg::replace(

                    
'{'.preg_quote($match[1]).'$}',


                    
addcslashes(',' $this->newline $this->indent $this->indent JsonFile::encode($package).': '.JsonFile::encode($constraint) . $match[1], '\\$'),

                    
$links

                
);

            } else {
                if ($append) {

                    
$children Preg::replace(

                        
'#'.$whitespace.'}$#',

                        
addcslashes(',' $this->newline $this->indent $this->indent JsonFile::encode($name).': '.$this->format($value1) . $whitespace '}''\\$'),

                        
$children

                    
);

                } else {
                    $children Preg::replace(

                        
'#^{'.$whitespace.'#',

                        
addcslashes('{' $whitespace JsonFile::encode($name).': '.$this->format($value1) . ',' $this->newline $this->indent $this->indent'\\$'),

                        
$children

                    
);

                }
        if (Preg::isMatch('#[^{\s](\s*)\}$#'$this->contents$match)) {

            
$this->contents Preg::replace(

                
'#'.$match[1].'\}$#',

                
addcslashes(',' $this->newline $this->indent JsonFile::encode($key). ': '$content $this->newline '}''\\$'),

                
$this->contents

            
);
        $this->contents Preg::replace(

            
'#\}$#',

            
addcslashes($this->indent JsonFile::encode($key). ': '.$content $this->newline '}''\\$'),

            
$this->contents

        
);