vosiz / php-utils
A PHP utilities library
Requires
- php: >=7.4
Requires (Dev)
- phpunit/phpunit: ^9.6
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v1.12.0
- v1.11.0
- v1.10.2
- 1.10.1
- v1.10.0
- v1.9.0
- v1.8.0
- v1.7.1
- v1.7.0
- v1.6.0
- v1.5.2
- v1.5.0
- v1.4.6
- v1.4.5
- v1.4.0
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- 1.2.1
- v1.2.0
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
- dev-dev
- dev-feature/io-helpers
- dev-fix/collections-case
- dev-filter
- dev-autoload
This package is auto-updated.
Last update: 2026-10-28 07:31:38 UTC
README
PHP utilities and commons - C# like classes (if you are to it), more OOP and useful functions.
Motivation
I write PHP the same way I write C#, so I keep the things I miss in one place instead of copying them from project to project. It is the base of my other packages (php-enum, va-tools) and of everything I build on them. Made by personal need, so feel free to use it if it fits yours. MIT - use it however you like.
Requirements
- PHP 7.4 or newer
- Composer
Bug tracker
No tracked
Features
Everything checked in the Roadmap.
Roadmap
- Collection, Dictionary, KeyValuePair
- Exceptionf - formatted exceptions with inner chain
- SmartObject, Singleton
- Is - type and emptiness checks
- Conversions and string helpers (tostr, camel, snake, ...)
- Crypto - PasswordHasher
- TimeFormat
- Io - Path, File, Dir, Inc
- Tests
Setup
composer require vosiz/php-utils
Namespaced classes go through an alias, the rest (functions, Exceptionf, Is, ...) is global.
use Vosiz\Utils\Collections\Collection; use Vosiz\Utils\Io; $user = new Collection(['name' => 'Joe']); echo $user->Name; $path = Io\Path::Combine('/var/www', 'app', 'index.php');
Tests
Docker is all you need, the suite runs on every supported PHP version.
./tests.sh