Search by

lifephp / utils

TonnyJMiellap

These are PHP Utils from LIFE.

v4.1.1 2026-09-07 22:26 UTC

README

GitLab Pipeline Status GitLab Pipeline Coverage GitLab Release Packagist Version PHPStan Level Packagist Downloads Packagist Monthly Downloads Packagist Stars GitLab Issues Packagist License Packagist Dependency Version

LIFE PHP Utils

LIFE PHP Utils are tools for you, to make your work easier in PHP.

Usage

Best way to install lifephp/utils is via Composer:

composer require lifephp/utils

What's inside

ClassPurpose
FileSystemAtomic & safe file operations — openAtomic() / closeAtomic() streaming (incl. gzip), saveAtomic(), safeWrite() / safeRead(), loadAtomic(), requireAtomic(), abortAtomic(), removeAtomic(), plus normalizePath(), createDir(), chmod().
FileObjectSplFileObject extension with transparent gzip (.gz) read/write and temp-file handling.
FileInfoSplFileInfo extension — normalized extension, chmod(), openFile().
ConvertorsstrToScalar() string-to-scalar coercion, isEnclosed().
PaginatorOffset / page-count / page-bounds helper.
HtmlhtmlToText().
ExceptionHelpergetLastError() — last PHP error as a string.
StaticClassTraitMarks a class as non-instantiable.

Exceptions (LifePHP\Utils\Exceptions): IOException, InvalidArgumentException, MemberAccessException, RuntimeException.

Documentation

Detailed docs live in /.docs.

Versions

StateVersionBranchPHP
stable^4.0.0PHP8.5>=8.5
stable^3.3.0PHP8.4>=8.4

Development

These are actual code maintainers:

TonnyJe

Miellap

Conclusion

This package requires PHP 8.5, and it is property of LifePHP © 2024-2026