addslashes

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Quote string with slashes
addslashes(string $string): string
    protected function modifyComment(Blueprint $blueprintFluent $column)

    {

        if (! 
is_null($column->comment)) {

            return 
" comment '".addslashes($column->comment)."'";

        }

    }
        return rtrim(sprintf('unique:%s,%s,%s,%s,%s',

            
$this->table,

            
$this->column,

            
$this->ignore '"'.addslashes($this->ignore).'"' 'NULL',

            
$this->idColumn,

            
$this->formatWheres()

        ), 
',');
            $filename = (string) preg_replace_callback('~^(?P<drive>[a-z]+:\\\)~i', static fn ($match): string => strtolower($match['drive']), $filename);

        }



        
$filename     str_replace('\\\\''\\'addslashes((string) realpath($filename)));

        
$rootPath     TestSuite::getInstance()->rootPath;

        
$relativePath str_replace($rootPath DIRECTORY_SEPARATOR''$filename);

        
$relativePath dirname(ucfirst($relativePath)) . DIRECTORY_SEPARATOR basename($relativePath'.php');
    public function addSlashes($value)

    {

        return 
addslashes($value);

    }
                    $if_true trim($bits[1]);




                    
$conditional '<?php if ('.$condition.'): ?>'.addslashes($this->getVariable($if_true$data)).'<?php endif ?>';




                    
$output stripslashes($this->parsePhp($conditional));
                    [$if_true$if_false] = explode(': '$bits[1]);




                    
$conditional '<?php echo('.$condition.') ? "'.addslashes($this->getVariable(trim($if_true), $data)).'" : "'.addslashes($this->getVariable(trim($if_false), $data)).'"; ?>';




                    
$output stripslashes($this->parsePhp($conditional));
            foreach ($modifiers as $modifier) {

                if (
is_array($modifier)) {

                    
$modifierKey key($modifier);

                    
$modifierValue addslashes(current($modifier));

                    if (
$modifierKey === 'default' && ($modifierValue === 'null' || $dataType === 'boolean' || $this->isNumericDefault($dataType$modifierValue))) {

                        
$column_definition .= sprintf('->%s(%s)'$modifierKey$modifierValue);

                    } else {