Download the PHP package napryc/php8-compat without Composer
On this page you can find all versions of the php package napryc/php8-compat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download napryc/php8-compat
More information about napryc/php8-compat
Files in napryc/php8-compat
Download napryc/php8-compat
More information about napryc/php8-compat
Files in napryc/php8-compat
Vendor napryc
Package php8-compat
Short Description PHP 8 compatibility layer for PHP 7.1+ applications
License MIT
Package php8-compat
Short Description PHP 8 compatibility layer for PHP 7.1+ applications
License MIT
Please rate this library. Is it a good library?
Informations about the package php8-compat
PHP8 Compatibility Layer
A lightweight compatibility layer that brings PHP 8.0+ string and array functions to PHP 7.1+ applications.
Features
- Multi-byte string functions support
- Array manipulation utilities
- Zero dependencies (except ext-mbstring)
- PHP 7.1+ compatible
- Automatic fallback to native PHP 8 functions when available
Installation
Install via Composer:
Available Functions
String Functions
str_contains()
- Determine if a string contains a given substringstr_starts_with()
- Check if a string starts with a given substringstr_ends_with()
- Check if a string ends with a given substringstr_increment()
- Increment a stringstr_decrement()
- Decrement a stringmb_str_pad()
- Pad a string to a certain length with another stringmb_trim()
- Strip whitespace or other characters from both sidesmb_ltrim()
- Strip whitespace or other characters from the left sidemb_rtrim()
- Strip whitespace or other characters from the right sidemb_ucfirst()
- Make a string's first character uppercasemb_lcfirst()
- Make a string's first character lowercaseArray Functions
array_is_list()
- Determine if an array is a listarray_find()
- Find first element matching callbackarray_find_key()
- Find first key matching callbackarray_any()
- Check if any element matches callbackarray_all()
- Check if all elements match callback
Math Functions
fdiv()
- Divide two numbers with proper handling of division by zero
JSON Functions
json_validate()
- Validate a JSON stringUsage
Requirements
- PHP 7.1 or higher
- ext-mbstring extension
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
All versions of php8-compat with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.1 || ^8.0
ext-mbstring Version *
ext-mbstring Version *
The package napryc/php8-compat contains the following files
Loading the files please wait ....