PHPackages                             alexsoft-software/phpbcl8 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. alexsoft-software/phpbcl8

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alexsoft-software/phpbcl8
=========================

PHP 8 Backwards Compatibility Library (phpbcl8).

2.0.5(1y ago)00proprietaryPHPPHP &gt;=5.6

Since Apr 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/alexsoft-software/phpbcl8)[ Packagist](https://packagist.org/packages/alexsoft-software/phpbcl8)[ Docs](https://apps.ascoos.com/phpbcl8)[ RSS](/packages/alexsoft-software-phpbcl8/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

[![](https://camo.githubusercontent.com/0352491dac03ff759df2f6c3a3d232ed8ebf018ce06e8c9e51b488d8acaa3293/68747470733a2f2f617070732e6173636f6f732e636f6d2f70687062636c382f696d616765732f70687042434c5f32353670782e706e67)](https://camo.githubusercontent.com/0352491dac03ff759df2f6c3a3d232ed8ebf018ce06e8c9e51b488d8acaa3293/68747470733a2f2f617070732e6173636f6f732e636f6d2f70687062636c382f696d616765732f70687042434c5f32353670782e706e67)

PHP 8 Backwards Compatibility Library
=====================================

[](#php-8-backwards-compatibility-library)

[![GitHub Downloads (all assets, all releases)](https://camo.githubusercontent.com/a5546e812b1830936a16b8956c945b7379113f53e115147607530dc25822477c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f616c6578736f66742d736f6674776172652f70687062636c382f746f74616c3f636f6c6f723d253233304538304330)](https://camo.githubusercontent.com/a5546e812b1830936a16b8956c945b7379113f53e115147607530dc25822477c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f616c6578736f66742d736f6674776172652f70687062636c382f746f74616c3f636f6c6f723d253233304538304330)[![GitHub Release](https://camo.githubusercontent.com/63d19efdc1d9925b5316773c5841de622ec36b7ca60449a4d5e6f285dde6be69/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f616c6578736f66742d736f6674776172652f70687062636c38)](https://camo.githubusercontent.com/63d19efdc1d9925b5316773c5841de622ec36b7ca60449a4d5e6f285dde6be69/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f616c6578736f66742d736f6674776172652f70687062636c38)[![GitHub Release Date](https://camo.githubusercontent.com/c94a790eec1a6e63f4fe37996562ee0f054b1bb041a687eae740fb5771683eca/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f616c6578736f66742d736f6674776172652f70687062636c383f636f6c6f723d253233304538304330)](https://camo.githubusercontent.com/c94a790eec1a6e63f4fe37996562ee0f054b1bb041a687eae740fb5771683eca/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f616c6578736f66742d736f6674776172652f70687062636c383f636f6c6f723d253233304538304330)[![GitHub repo size](https://camo.githubusercontent.com/7794f7a43702010fa21788e7acfe3831351e46b6358da8f2fd94cd2a150e8094/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f616c6578736f66742d736f6674776172652f70687062636c38)](https://camo.githubusercontent.com/7794f7a43702010fa21788e7acfe3831351e46b6358da8f2fd94cd2a150e8094/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f616c6578736f66742d736f6674776172652f70687062636c38)[![PHP 8 Backwards Compatibility Library - total lines](https://camo.githubusercontent.com/0575c03ce2d980de05fc20c5bb6d2f496cfde1e17b96e12c1f37bc3dc9afa98a/68747470733a2f2f746f6b65692e72732f62312f6769746875622f616c6578736f66742d736f6674776172652f70687062636c383f63617465676f72793d6c696e6573)](https://github.com/alexsoft-software/phpbcl8)[![PHP 8 Backwards Compatibility Library - source code lines](https://camo.githubusercontent.com/7df3da72fca98ca948581676dfd34c5b71a73ee00eb89b2f983f44e4ba991cc6/68747470733a2f2f746f6b65692e72732f62312f6769746875622f616c6578736f66742d736f6674776172652f70687062636c383f63617465676f72793d636f6465)](https://github.com/alexsoft-software/phpbcl8)[![PHP 8 Backwards Compatibility Library - files in repository](https://camo.githubusercontent.com/68438200caab575f2f67a8fff85739a50e5322b5494eb53b54b2ed908177627f/68747470733a2f2f746f6b65692e72732f62312f6769746875622f616c6578736f66742d736f6674776172652f70687062636c383f63617465676f72793d66696c6573)](https://github.com/alexsoft-software/phpbcl8)

Description
-----------

[](#description)

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.

---

### SOURCEFORGE

[](#sourceforge)

[![Download phpbcl8](https://camo.githubusercontent.com/94bd673d2d886e0408850931b3351dc68c33e33615329e678d31f48c2cb51597/68747470733a2f2f696d672e736869656c64732e696f2f736f75726365666f7267652f64742f70687062636c382e737667)](https://sourceforge.net/projects/phpbcl8/files/latest/download)[![Download phpbcl8](https://camo.githubusercontent.com/f43978b3cbdb8d9c54255d01083fb5028b43a3d90a8603ade530fe02303f84c2/68747470733a2f2f696d672e736869656c64732e696f2f736f75726365666f7267652f646d2f70687062636c382e737667)](https://sourceforge.net/projects/phpbcl8/files/latest/download)[![Download phpbcl8](https://camo.githubusercontent.com/b981b101acd75cc4f80d175153390599f372b19d89fd57e44a84abd2faa76292/68747470733a2f2f696d672e736869656c64732e696f2f736f75726365666f7267652f64772f70687062636c382e737667)](https://sourceforge.net/projects/phpbcl8/files/latest/download)[![Download phpbcl8](https://camo.githubusercontent.com/60ddc38cd16abc802396ebfd01014230d643426d768c12c27585b661bf12fee4/68747470733a2f2f696d672e736869656c64732e696f2f736f75726365666f7267652f64642f70687062636c382e737667)](https://sourceforge.net/projects/phpbcl8/files/latest/download)

---

Contributing
------------

[](#contributing)

This is an open source project, open to anyone.

Contributions are welcome [github](https://github.com/alexsoft-software/phpbcl8)

Feedback
--------

[](#feedback)

Please send any feedback or suggestions to [@ascoos](https://twitter.com/ascoos) (Twitter) or [create an issue](https://issues.ascoos.com).

License
-------

[](#license)

[![AGL-F](https://camo.githubusercontent.com/43c9ea41a52f16f9855046ca5c02f29ce0b0f8dd0ce355300bd9bd5d8e29ee2a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d41474c462d626c75652e737667)](http://docs.ascoos.com/lics/ascoos/AGL-F.html)

---

Download
--------

[](#download)

[![OFFICIAL ASCOOS DOWNLOAD SITE](https://camo.githubusercontent.com/fa6267c57707dfb4bf615f960b506582013bbd3acea954b1b073636d66fdc8b0/68747470733a2f2f696d672e736869656c64732e696f2f776562736974653f75726c3d68747470733a2f2f646c2e6173636f6f732e636f6d2f7075622f70687062636c38)](https://dl.ascoos.com/pub/phpbcl8/phpbcl8-latest.zip)[![PHP Classes](https://camo.githubusercontent.com/974777b00457f9205d4ca7158c38b2f855b3e23ea2e82929e6dadc9cca836952/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769744875622d70687062636c382d626c75652e737667)](https://github.com/alexsoft-software/phpbcl8/releases)[![PHP Classes](https://camo.githubusercontent.com/8b4a94a79f43f44687b40e0a91a226a5b6d929b69cba415d01253b2343065bf0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d636c61737365732d626c75652e737667)](https://www.phpclasses.org/package/13417.html)[![Sourceforge phpbcl8](https://camo.githubusercontent.com/efe134f587d92cce7b4d0b1175a700f2af11415027a1b19c53768b91f99584dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536f75726365466f7267652d70687062636c382d626c75652e737667)](https://sourceforge.net/projects/phpbcl8/files/latest/download)

---

Installation and use this library
=================================

[](#installation-and-use-this-library)

1. Download latest release
2. Unzip package in your working directory
3. Add in index.php or master php file the below code :

```
$path = '[YOUR SITE PATH]';
include $path . '/phpbcl8/autoload.php';
```

---

- \[!\] = FIXED
- \[+\] = Added
- \[^\] = Updated
- \[-\] = Removed

Error FILE \[compat\_error.php\]
--------------------------------

[](#error-file--compat_errorphp)

This file contains support code for the remaining functions of the phpbcl8 library.

APHPphpbcl8TYPENAMEDESCRIPTION+ALL1.0.8FILE`compat_error.php`To support errorsphpbcl8 FILE \[phpbcl.php\]
---------------------------

[](#phpbcl8-file--phpbclphp)

This file contains support code for the remaining functions of the phpbcl8 library.

APHPphpbcl8TYPENAMEDESCRIPTION+ALL1.0.5FILE`phpbcl.php`To support other functions in this php libraryDEPRECATED FILE \[compat\_deprecated.php\]
------------------------------------------

[](#deprecated-file--compat_deprecatedphp)

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.

APHPphpbcl8TYPENAMEDESCRIPTION+ALL1.0.0FILE`compat_deprecated.php`for deprecated-removed php functions+&gt;= 8.1.01.0.0CONST`ENT_COMPAT`ENT\_QUOTES+&gt;= 8.0.01.0.0CONST`MB_OVERLOAD_MAIL`= 1+&gt;= 8.0.01.0.0CONST`MB_OVERLOAD_STRING`= 2+&gt;= 8.0.01.0.0CONST`MB_OVERLOAD_REGEX`= 4+&gt;= 8.0.01.0.0Function`each`Return the current key and value pair from an array and advance the array cursor.---

VERSIONING FILES \[compat\_php81x.php - compat\_php85x.php\]
------------------------------------------------------------

[](#versioning-files--compat_php81xphp---compat_php85xphp)

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`](https://sourceforge.net/projects/ascoos-web-extended-studio/) with PHP 8.0 and 8.2"

APHPphpbcl8TYPENAMEDESCRIPTION+&lt; 8.5.02.0.4Function`array_first.php`Returns the first value of a given array.+&lt; 8.5.02.0.4Function`array_last.php`Returns the last value of a given array.+&lt; 8.5.02.0.4Function`locale_is_right_to_left.php`Returns whether the given $locale has an RTL script.+&lt; 8.5.02.0.4Function`get_error_handler.php`Returns the currently set error handler, or null if none is set.+&lt; 8.5.02.0.4Function`get_exception_handler.php`Returns the currently set exception handler, or null if is none set.+&lt; 8.5.02.0.0Constant`PHP_BUILD_DATE`that is assigned the time and date the PHP binary is built.+&lt; 8.4.01.1.4Function`intltz_get_iana_id`Get the IANA identifier from a given timezone+&lt; 8.4.01.1.2Function`bcdivmod`Returns an array with the quotient (whole values) as a string, and the remainder as a string containing $scale number of decimal values.+&lt; 8.4.01.1.1Function`grapheme_str_split`Splits a string into an array of individual or chunks of graphemes.+&lt; 8.4.01.1.1Function`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.+&lt; 8.4.01.1.1Function`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.+&lt; 8.4.01.1.1Function`array_all`Checks whether the $callback returns TRUE for ALL the array elements.+&lt; 8.4.01.1.1Function`array_any`Checks whether the $callback returns TRUE for ANY of the array elements.+&lt; 8.4.01.1.0Function`http_get_last_response_headers`Get Last Response Headers+&lt; 8.4.01.1.0Function`http_clear_last_response_headers`Clear Last Response Headers^&lt; 8.4.01.0.7Function`mb_ltrim`Multi-byte safely strip white-spaces (or other characters) from the beginning of a string.^&lt; 8.4.01.0.7Function`mb_rtrim`Multi-byte safely strip white-spaces (or other characters) from the end of a string.^&lt; 8.4.01.0.7Function`mb_trim`Multi-byte safely strip white-spaces (or other characters) from the beginning and end of a string.^&lt; 8.4.01.0.5Function`mb_ucfirst`Make a multibyte string's first character uppercase.^&lt; 8.4.01.0.5Function`mb_lcfirst`Make a multibyte string's first character lowercase.+&lt; 8.3.01.0.2Function`mb_str_pad`The str\_pad() function lacks multibyte character support, causing issues when working with languages that utilize multibyte encodings like UTF-8.+&lt; 8.3.01.0.9Function`stream_context_set_options`Sets options on the specified context.+&lt; 8.3.01.0.0Function`json_validate`Validate an string if contains a valid json.+&lt; 8.2.01.0.9Function`openssl_cipher_key_length`Gets the cipher key length.+&lt; 8.2.01.0.8Function`ini_parse_quantity`Returns the interpreted size in bytes on success from an ini shorthand.^&lt; 8.2.01.0.8Function`mysqli_execute_query`Prepares, binds parameters, and executes SQL statement+&lt; 8.1.01.0.2Function`array_is_list`Checks whether a given array is a listSIMILAR FILE \[compat\_similar.php\]
------------------------------------

[](#similar-file--compat_similarphp)

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_`"

APHPphpbcl8TYPENAMEDESCRIPTION+&gt;= 8.3.01.0.9FILE`alf_get_class`Fixed E\_DEPRECATED warning+ALL1.0.1FILE`compat_similar.php`for similar functions+ALL1.0.2Function`alf_mb_convert_case`ASCOOS LIBRARY FUNCTION : For full compatible similar mb\_convert\_case.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance48

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

386d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0fd764155ac7d034ff39a7170a16b320bb0163887490c277d0b4e41495267fa?d=identicon)[ascoos](/maintainers/ascoos)

---

Top Contributors

[![ascoos](https://avatars.githubusercontent.com/u/4207994?v=4)](https://github.com/ascoos "ascoos (4 commits)")

---

Tags

ascoosascoos-frameworkbackwardbackward-compatibilitycompatcompatibilitycomposer-packagelibinlibrariesphp-libraryphp-polyfillphp-polyfillsphp8polyfillspoylfill

### Embed Badge

![Health badge](/badges/alexsoft-software-phpbcl8/health.svg)

```
[![Health](https://phpackages.com/badges/alexsoft-software-phpbcl8/health.svg)](https://phpackages.com/packages/alexsoft-software-phpbcl8)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
