| Recommend this page to a friend! |
| Info | Example | Reputation | Support forum | Blog | Links |
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2025-04-27 (2 months ago) | Not yet rated by the users | Total: 34 | All time: 11,063 This week: 51 | |||||
| Version | License | PHP version | Categories | |||
| phpbcl8 2.0.5 | Custom (specified... | 8.0 | Libraries, Language, PHP 7 |
| Description | Author | |
This package provides functions of PHP 8 that work in older PHP versions. |
<?php
|
<p align="center"><img src="https://apps.ascoos.com/phpbcl8/images/phpBCL_256px.png" height=256 /></p>
This package provides functions of newer PHP 8 versions.
It provides scripts that implement functions only available in newer PHP versions as functions built-in in the PHP core engine. The parts work in older PHP versions.
A main script checks the current PHP version and loads that implement the functions of newer PHP versions.
*
*
This is an open source project, open to anyone.
Contributions are welcome github
Please send any feedback or suggestions to @ascoos (Twitter) or create an issue.
*
*
$path = '[YOUR SITE PATH]';
include $path . '/phpbcl8/autoload.php';
<br>
*
<br>
This file contains support code for the remaining functions of the phpbcl8 library.
| A | PHP | phpbcl8 | TYPE | NAME | DESCRIPTION
|---|-----------|--------|-----------|-------------------------|-----------------------------------------
| + | ALL | 1.0.8 | FILE | compat_error.php | To support errors
This file contains support code for the remaining functions of the phpbcl8 library.
| A | PHP | phpbcl8 | TYPE | NAME | DESCRIPTION
|---|-----------|--------|-----------|-------------------------|-----------------------------------------
| + | ALL | 1.0.5 | FILE | phpbcl.php | To support other functions in this php library
The use of the contents of the deprecated-removed code file is the reverse of the use of other files versioning-based on the php version.
This means that from the PHP version that refers and to newer versions, without the use of phpbcl8 and specifically the file compat_deprecated.php, you will not be able to use this code.
| A | PHP | phpbcl8 | TYPE | NAME | DESCRIPTION
|---|-----------|--------|-----------|-------------------------|-----------------------------------------
| + | ALL | 1.0.0 | FILE | compat_deprecated.php | for deprecated-removed php functions
| + | >= 8.1.0 | 1.0.0 | CONST | ENT_COMPAT | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401
| + | >= 8.0.0 | 1.0.0 | CONST | MB_OVERLOAD_MAIL | = 1
| + | >= 8.0.0 | 1.0.0 | CONST | MB_OVERLOAD_STRING | = 2
| + | >= 8.0.0 | 1.0.0 | CONST | MB_OVERLOAD_REGEX | = 4
| + | >= 8.0.0 | 1.0.0 | Function | each | Return the current key and value pair from an array and advance the array cursor.
The contents of version-based files mean that since added to a specific PHP version, without using phpbcl8, you will not be able to use them in older versions.
>"All functions in the below table were tested on Ascoos Web Extended Studio 24 with PHP 8.0 and 8.2"
| A | PHP | phpbcl8 | TYPE | NAME | DESCRIPTION
|---|----------|--------|-----------|-------------------------|-----------------------------------------
| + | < 8.5.0 | 2.0.4 | Function | array_first.php | Returns the first value of a given array.
| + | < 8.5.0 | 2.0.4 | Function | array_last.php | Returns the last value of a given array.
| + | < 8.5.0 | 2.0.4 | Function | locale_is_right_to_left.php | Returns whether the given $locale has an RTL script.
| + | < 8.5.0 | 2.0.4 | Function | get_error_handler.php | Returns the currently set error handler, or null if none is set.
| + | < 8.5.0 | 2.0.4 | Function | get_exception_handler.php | Returns the currently set exception handler, or null if is none set.
| + | < 8.5.0 | 2.0.0 | Constant | PHP_BUILD_DATE | that is assigned the time and date the PHP binary is built.
| + | < 8.4.0 | 1.1.4 | Function | intltz_get_iana_id | Get the IANA identifier from a given timezone
| + | < 8.4.0 | 1.1.2 | Function | bcdivmod | Returns an array with the quotient (whole values) as a string, and the remainder as a string containing $scale number of decimal values.
| + | < 8.4.0 | 1.1.1 | Function | grapheme_str_split | Splits a string into an array of individual or chunks of graphemes.
| + | < 8.4.0 | 1.1.1 | Function | array_find | Returns the VALUE of the first element from $array for which the $callback returns true. Returns NULL if no matching element is found.
| + | < 8.4.0 | 1.1.1 | Function | array_find_key | Returns the KEY of the first element from $array for which the $callback returns TRUE. If no matching element is found the function returns NULL.
| + | < 8.4.0 | 1.1.1 | Function | array_all | Checks whether the $callback returns TRUE for ALL the array elements.
| + | < 8.4.0 | 1.1.1 | Function | array_any | Checks whether the $callback returns TRUE for ANY of the array elements.
| + | < 8.4.0 | 1.1.0 | Function | http_get_last_response_headers | Get Last Response Headers
| + | < 8.4.0 | 1.1.0 | Function | http_clear_last_response_headers | Clear Last Response Headers
| ^ | < 8.4.0 | 1.0.7 | Function | mb_ltrim | Multi-byte safely strip white-spaces (or other characters) from the beginning of a string.
| ^ | < 8.4.0 | 1.0.7 | Function | mb_rtrim | Multi-byte safely strip white-spaces (or other characters) from the end of a string.
| ^ | < 8.4.0 | 1.0.7 | Function | mb_trim | Multi-byte safely strip white-spaces (or other characters) from the beginning and end of a string.
| ^ | < 8.4.0 | 1.0.5 | Function | mb_ucfirst | Make a multibyte string's first character uppercase.
| ^ | < 8.4.0 | 1.0.5 | Function | mb_lcfirst | Make a multibyte string's first character lowercase.
| + | < 8.3.0 | 1.0.2 | Function | mb_str_pad | The str_pad() function lacks multibyte character support, causing issues when working with languages that utilize multibyte encodings like UTF-8.
| + | < 8.3.0 | 1.0.9 | Function | stream_context_set_options | Sets options on the specified context.
| + | < 8.3.0 | 1.0.0 | Function | json_validate | Validate an string if contains a valid json.
| + | < 8.2.0 | 1.0.9 | Function | openssl_cipher_key_length | Gets the cipher key length.
| + | < 8.2.0 | 1.0.8 | Function | ini_parse_quantity | Returns the interpreted size in bytes on success from an ini shorthand.
| ^ | < 8.2.0 | 1.0.8 | Function | mysqli_execute_query | Prepares, binds parameters, and executes SQL statement
| + | < 8.1.0 | 1.0.2 | Function | array_is_list | Checks whether a given array is a list
This file implements functions that resemble the original php functions that have not been removed, but have undergone changes and cannot run on all versions.
> "All similar functions start with prefix alf_"
| A | PHP | phpbcl8 | TYPE | NAME | DESCRIPTION
|---|----------|--------|-----------|-------------------------|-----------------------------------------
| + | >= 8.3.0 | 1.0.9 | FILE | alf_get_class | Fixed E_DEPRECATED warning
| + | ALL | 1.0.1 | FILE | compat_similar.php | for similar functions
| + | ALL | 1.0.2 | Function | alf_mb_convert_case | ASCOOS LIBRARY FUNCTION : For full compatible similar mb_convert_case.
| File | Role | Description | ||
|---|---|---|---|---|
| Conf. | Configuration script | |||
| Doc. | ChangeLogs | |||
| Data | Auxiliary data | |||
| Data | Empty page | |||
| Data | Auxiliary data | |||
| Lic. | License text | |||
| Doc. | Documentation | |||
| / | src |
| File | Role | Description | ||
|---|---|---|---|---|
| |
Class | Compatibilities Manager | ||
| |
Data | Empty page | ||
| |
Class | phpBCL Manager | ||
| / | src | / | compat |
| File | Role | Description |
|---|---|---|
| |
Class | Consts script |
| |
Class | Deprecated Functions script |
| |
Class | Error Functions script |
| |
Class | Supports functions for PHP < 8.1 |
| |
Class | Supports functions for PHP < 8.2 |
| |
Class | Supports functions for PHP < 8.3 |
| |
Class | Supports functions for PHP < 8.4 |
| |
Class | Supports functions for PHP < 8.5 |
| |
Class | Similar Functions |
| |
Data | Empty page |
| / | test |
| File | Role | Description |
|---|---|---|
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Example | Example script |
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Aux. | Configuration script |
| |
Example | Returns the currently set exception handler, or null if is none set. |
| |
Example | Returns whether the given $locale has an RTL script. |
| |
Example | Example script |
| |
Example | Example script |
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| Version Control | Reuses | Unique User Downloads | Download Rankings | ||||||||||||||||
| 100% | 1 |
|
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
| Other classes that need this package |
| Class | Why it is needed | Dependency |
|---|---|---|
| Ascoos Framework | This library included on Ascoos Framework 24 | Optional |