PHP code example of inboxly / text-processing
1. Go to this page and download the library: Download inboxly/text-processing 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/ */
inboxly / text-processing example snippets
use Illuminate\Container\Container;
use Inboxly\TextProcessing\Handlers\RemoveHtml;
use Inboxly\TextProcessing\Handlers\Trim;
use Inboxly\TextProcessing\Processor;
$container = new Container();
$processor = new Processor($container);
$text = " \t Text has <span>html</span>, spaces, tab and newlines \n\n ";
$result = $processor->process($text, [RemoveHtml::class, Trim::class]);
echo $result; // "Text has html, tab and newlines"