PHP code example of sidspears / string-search
1. Go to this page and download the library: Download sidspears/string-search 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/ */
sidspears / string-search example snippets
dSpears\StringSearcher\StringSearcher;
$stringSearcher = new StringSearcher('config.yaml');
$result = $stringSearcher->findStringAndPosition('file.txt', 'textToFind');
print_r($result);