Download the PHP package oihana/php-core without Composer
On this page you can find all versions of the php package oihana/php-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oihana/php-core
More information about oihana/php-core
Files in oihana/php-core
Package php-core
Short Description The Oihana PHP Core library
License MPL-2.0
Homepage https://github.com/BcommeBois/oihana-php-core
Informations about the package php-core
Oihana PHP - Core library
A lightweight and modular core library for modern PHP development. Designed for clarity, extensibility, and performance, with a consistent, functional-style API.
๐ Documentation
Full project documentation is available at: ๐ https://bcommebois.github.io/oihana-php-core
- Changelog: CHANGELOG.md
- License: MPL-2.0
๐ฆ๏ธ Installation
Requires PHP 8.4+
Install via Composer:
โจ Features
The oihana/php-core library provides pure utility functions (no side effects), organized into logical, reusable packages:
๐งพ Accessors (oihana\core\accessors)
Unified access for both arrays and objects:
- Read: getKeyValue()
- Write: setKeyValue()
- Delete: deleteKeyValue() (supports wildcards: , foo.bar.)
- Exists: hasKeyValue()
- Validation and traversal: assertDocumentKeyValid(), resolveReferencePath()
Designed for safely accessing and modifying deep nested structures with dot notation support and automatic path creation.
๐ข Arrays (oihana\core\arrays)
Advanced array utilities:
- Access and mutation: get(), set(), delete(), exists()
- Transformations: flatten(), tail(), unique(), shuffle(), swap(), toArray(), stub()
- Structure detection: isIndexed(), hasIntKeys(), hasStringKeys()
๐ Date (oihana\core\date)
Date manipulation and validation:
- formatDateTime()
- isDate(), isValidTimezone()
โ Maths (oihana\core\maths)
Smart numeric rounding helpers:
- ceilValue(), floorValue(), roundValue()
๐ข Numbers (oihana\core\numbers)
- Range clamping: clip()
๐งฑ Objects (oihana\core\objects)
Lightweight object manipulation:
- compress() โ remove null/empty values
- set() โ deep set a value in a nested structure
โ๏ธ Strings (oihana\core\strings)
String formatting, case conversions, and utilities:
- Case & slug: camel(), snake(), kebab(), hyphenate(), lower(), latinize()
- Format & identifiers: fastFormat(), formatRequestArgs(), urlencode(), toString()
- Validation: isRegexp(), luhn()
- Random generation: randomKey()
โ๏ธ Utils
- ifNull() โ return a fallback if a value is null
๐ Quick Start
Most helpers are loaded via Composer autoload. You can import functions directly using use function
and call them.
๐งช Examples
Accessors: work with arrays and objects
Arrays: reading and transforming
Strings: formatting and cases
โ Running Unit Tests
To run all tests:
To run a specific test file:
๐งพ License
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).
๐ค About the author
- Author : Marc ALCARAZ (aka eKameleon)
- Mail : [email protected]
- Website : http://www.ooop.fr
All versions of php-core with dependencies
ext-intl Version *
ext-posix Version *