addslashes

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Quote string with slashes
<?php addslashes(string $string): string
<?php     public function addSlashes($value)

    {

        return addslashes($value);

    }
<?php                     $if_true = trim($bits[1]);




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




                    $output = stripslashes($this->parsePhp($conditional));
<?php                     [$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));