PHP code example of vinogradova / sanitizer

1. Go to this page and download the library: Download vinogradova/sanitizer 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/ */

    

vinogradova / sanitizer example snippets


$data     = ['a' => [9502900655, 89502900655, 79502900655, "+7(950)290-06-55"]];
$typeData = ['a' => ['phone']];

$sanitizerV1 = new Sanitizer($data, $typeData);
$sanitizerV1->sanitize();
	
// Результат
// ['a' => ["79502900655", "79502900655", "79502900655", "79502900655"]]