Skip to content

PHP 8 Backwards Compatibility Library: Functions of newer PHP 8.x versions for older PHP 8.x versions

Notifications You must be signed in to change notification settings

alexsoft-software/phpbcl8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP 8 Backwards Compatibility Library

GitHub Downloads (all assets, all releases) GitHub Release GitHub Release Date GitHub repo size PHP 8 Backwards Compatibility Library - total lines PHP 8 Backwards Compatibility Library - source code lines PHP 8 Backwards Compatibility Library - files in repository

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

Download phpbcl8 Download phpbcl8 Download phpbcl8 Download phpbcl8


Contributing

This is an open source project, open to anyone.

Contributions are welcome github

Feedback

Please send any feedback or suggestions to @ascoos (Twitter) or create an issue.

License

AGL-F


Download

OFFICIAL ASCOOS DOWNLOAD SITE PHP Classes PHP Classes Sourceforge phpbcl8


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]

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

phpbcl8 FILE [phpbcl.php]

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

DEPRECATED FILE [compat_deprecated.php]

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
+ >= 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.

VERSIONING FILES [compat_php81x.php - compat_php85x.php]

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

SIMILAR FILE [compat_similar.php]

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.