PHP code example of bayfrontmedia / php-sanitize
1. Go to this page and download the library: Download bayfrontmedia/php-sanitize 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/ */
bayfrontmedia / php-sanitize example snippets
composer
use Bayfront\Sanitize\Sanitize;
$input = '1.42';
echo Sanitize::cast($input, Sanitize::CAST_FLOAT);
use Bayfront\Sanitize\Sanitize;
$path = '/some/ bad//path';
echo Sanitize::path($path);