Releases: ascoos/phpbcl
Releases · ascoos/phpbcl
Release list
2.2.1
2.2.0
2.2.0 [2026-04-22]
PHP < 8.6
- Added constant
ARRAY_FILTER_USE_VALUE: This constant is assigned value 0, which is the same as the default value for the $mode parameter. - Added function
grapheme_strrev: reverses the order of a string in grapheme units. - Added enum
SortDirection: The new SortDirection Enum is a Unit Enum, which means the individual elements of the Enum do not have a scalar value such as ASC or DESC backing them.
phpbcl Examples
- Added example file
86_enum_sortdirection.php: PHP applications that need to use the new SortDirection Enum can define it as a type. When a backed value is needed, consider using a match expression. - Added example file
86_enum_sortdirection.php: Reverse a string by grapheme clusters.
2.1.0
2.1.0 [2026-01-16]
- Fix
composer.json - Fix
libin.json
PHP < 8.6
- Added function
clamp: Returns the value clamped between min and max (nearest bound if out of range). Throws ValueError on invalid args (NAN, min > max).
phpbcl Examples
- Added example file
86_clamp.php: Returns the value clamped between min and max (nearest bound if out of range).
2.0.5
2.0.4
2.0.4 [2025-04-27]
PHP < 8.5
- Added function
array_first.php: Returns the first value of a given array. - Added function
array_last.php: Returns the last value of a given array. - Added function
locale_is_right_to_left.php: Returns whether the given $locale has an RTL script. - Added function
get_error_handler.php: Returns the currently set error handler, or null if none is set. - Added function
get_exception_handler.php: Returns the currently set exception handler, or null if is none set.
PHP < 8.3
- Fixed function
mb_str_padfor use in PHP >= 5.6.40
phpbcl Examples
- Added example file
85_array_first.php: Returns the first value of a given array. - Added example file
85_array_last.php: Returns the last value of a given array. - Added example file
85_locale_is_right_to_left.php: Returns whether the given $locale has an RTL script. - Added example file
85_get_error_handler.php: Returns the currently set error handler, or null if none is set. - Added example file
85_get_exception_handler.php: Returns the currently set exception handler, or null if is none set.