The bunch of functions extending the PHP standard library.
- PHP >= 8.0.0
There's a simple way to install able/fixes
into your project via Composer:
composer require able/fixes
- preg_count
Takes two arguments and returns the count of matches found by a pattern.
The behavior is identical to the standard preg_replace
function.
Declaration:
function preg_count(string $pattern, string $subject): int
Example:
$count = preg_count('/%[^%]/', '|%s|%s|%%|');
echo $count;
// 2
- array_merge_recursive_distinct(array $Original, array $Source): array
- file_purge(string $filename, int $flags = 0, $context = null): false|int
This package is released under the MIT license.