PHP code example of ismailocal / text-replacer

1. Go to this page and download the library: Download ismailocal/text-replacer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ismailocal / text-replacer example snippets


use IsmailOcal\TextReplacer\TextReplacer;

$replacer = new TextReplacer('./project_directory', 'old_text', 'new_text');

// Optional: Customize excluded directories
$replacer->setExcludedDirectories(['vendor', 'node_modules']);

// Start the process
$replacer->execute();