able/fixes

The bunch of functions extending the PHP standard library.

Maintainers

Details

github.com/phpable/fixes

Source

Issues

Installs: 1 187

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/able/fixes

v1.0.0 2021-05-11 04:11 UTC

This package is auto-updated.

Last update: 2025-10-06 16:40:37 UTC


README

The bunch of functions extending the PHP standard library.

Requirements

  • PHP >= 8.0.0

Install

There's a simple way to install able/fixes into your project via Composer:

composer require able/fixes

The list of function

PCRE functions

  • 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 functions

  • array_merge_recursive_distinct(array $Original, array $Source): array

Filesystem functions

  • file_purge(string $filename, int $flags = 0, $context = null): false|int

License

This package is released under the MIT license.