empaphy/usephul

Provides useful classes and functions that extend the standard functionality of PHP.

Installs: 20 478

Dependents: 2

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/empaphy/usephul

v1.9.0 2025-12-20 19:57 UTC

README

Tests Quality

Usephul is a PHP library that provides useful classes and functions that extend the standard functionality of PHP.

Table of Contents

Overview

Array Functions

Attribute Functions

  • applies() — Finds whether an attribute has been applied to a given object, class, interface, or trait.

Enumerations

  • EnumDynamicity — Adds dynamicity of case names to PHP Enumerations.

Error Handling Functions

Generators

Math

  • greatest() — Finds the value that is greater than all the other values.
  • least() — Finds the value that is less than all the other values.
  • rank() — Returns the ordinal rank for a given value.

Paths

Classes:

  • PathInfo — Provides information about a file path.

Functions:

PCRE Functions

  • preg_escape() — Escapes all instances of the given PCRE delimiter character in a raw regular expression pattern.

SPL Functions

Trait Functions

  • uses() — Checks whether an object or class uses a given trait.

Types

Enums:

  • Fallback — A unit enum representing an fallback value.

Constants:

  • fallback — An alias to Fallback::default, representing a default fallback value.

Variable handling Functions