PHP code example of villermen / data-handling
1. Go to this page and download the library: Download villermen/data-handling 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/ */
villermen / data-handling example snippets
Clean::text('<p>dirty &emdash; nasty<br>html</p>'); // "dirty — nasty html"
Clean::text('<p>dirty &emdash; nasty<br>html</p>', ['br']); // "dirty — nasty<br>html"
Clean::alphanumeric('proteïne shake'); // "proteineshake"
Clean::alphanumeric('proteïne shake', ' '); // "proteine shake"
Clean::slug('ßÈÿ žÐ-'); // "ssey-zdj"
Clean::digits("1 abc 23\n4") // "1234"
Path::format('/././//.///path//to\\file'); // "/path/to/file"
Path::merge('/root/directory', '/relative/path'); // "/root/directory/relative/path"
Path::makeRelative('/root/directory', '/root/directory/relative/path') // "relative/path"
Path::formatFilesize(1436549120); // "1.34 GiB"
Filter::match('file23.txt', 'file*.txt') // true