PHP code example of slick / filter
1. Go to this page and download the library: Download slick/filter 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/ */
slick / filter example snippets
use Slick\Filter\StaticFilter;
echo StaticFilter::filter('number', '12 3'); // Will output 123
$text = StaticFilter::filter('text', 123);
echo is_string($text); // will output 1 (true)
use Slick\Filter\FilterChain;
use Slick\Filter\StaticFilter;
$filterChain = new FilterChain();
$filterChain
->add(StaticFilter::create('text'))
->add(StaticFilter::create('htmlEntities'));
$input = '<p>This is a simple text & cia!</p>';
$output = $filterChain->filter($value);
echo $output;