str_replace

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Replace all occurrences of the search string with the replacement string
<?php str_replace(    array|string $search,    array|string $replace,    string|array $subject,    int &$count = null): string|array
<?php             return $value;

        }



        $value = str_replace("'", "''", $value);



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

    }
<?php             return sprintf('%F', $value);

        }



        return "'" . str_replace("'", "''", $value) . "'";

    }



    public function exec(string $sql): int
<?php             unset($params['driverClass']);




            $driver = str_replace('-', '_', $scheme);
<?php     {

        $c = $this->getIdentifierQuoteCharacter();



        return $c . str_replace($c, $c . $c, $str) . $c;

    }
<?php     {

        $c = $this->getStringLiteralQuoteCharacter();



        return $c . str_replace($c, $c . $c, $str) . $c;

    }
<?php     private function isReservedWord($word)

    {

        if ($word[0] === '`') {

            $word = str_replace('`', '', $word);

        }



        $keywordLists = [];
<?php     public function quoteStringLiteral($str)

    {

        $str = str_replace('\\', '\\\\', $str); // MySQL requires backslashes to be escaped aswell.



        return parent::quoteStringLiteral($str);

    }
<?php     {

        return parent::getForeignKeyDeclarationSQL(new ForeignKeyConstraint(

            $foreignKey->getQuotedLocalColumns($this),

            str_replace('.', '__', $foreignKey->getQuotedForeignTableName($this)),

            $foreignKey->getQuotedForeignColumns($this),

            $foreignKey->getName(),

            $foreignKey->getOptions()
<?php     protected function _getCreateTableSQL($name, array $columns, array $options = [])

    {

        $name        = str_replace('.', '__', $name);

        $queryFields = $this->getColumnDeclarationListSQL($columns);



        if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) {
<?php     public function getListTableConstraintsSQL($table)

    {

        $table = str_replace('.', '__', $table);



        return sprintf(

            "SELECT sql FROM sqlite_master WHERE type='index' AND tbl_name = %s AND sql NOT NULL ORDER BY name",
<?php     public function getListTableColumnsSQL($table, $database = null)

    {

        $table = str_replace('.', '__', $table);



        return sprintf('PRAGMA table_info(%s)', $this->quoteStringLiteral($table));

    }
<?php     public function getListTableIndexesSQL($table, $database = null)

    {

        $table = str_replace('.', '__', $table);



        return sprintf('PRAGMA index_list(%s)', $this->quoteStringLiteral($table));

    }
<?php     public function getTruncateTableSQL($tableName, $cascade = false)

    {

        $tableIdentifier = new Identifier($tableName);

        $tableName       = str_replace('.', '__', $tableIdentifier->getQuotedName($this));



        return 'DELETE FROM ' . $tableName;

    }
<?php     public function getInlineColumnCommentSQL($comment)

    {

        return '--' . str_replace("\n", "\n--", $comment) . "\n";

    }



    private function getInlineTableCommentSQL(string $comment): string
<?php     public function getTemporaryTableName($tableName)

    {

        $tableName = str_replace('.', '__', $tableName);



        return $tableName;

    }