Download the PHP package colopl/colopl_bc without Composer

On this page you can find all versions of the php package colopl/colopl_bc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package colopl_bc

colopl_bc

Provides various compatibility functions required for PHP (temporary) migration.

[!WARNING] This extension is intended for temporary use only. In other words, code in the production environment should not rely on this implementation as much as possible, and should be gradually phased out when it is safe to do so.

Supported Versions

Library is introduced for migration to PHP 8.x with the same code base. If you do not need to work with the same code base, you can use only the Extension.

Usage

Install

This repository contains an Extension that provides the main compatibility and an assisting Library, each of which must be installed separately.

Extension can be installed in the following steps. Note that the PHP common build tool chain is required.

Don't forget to enable extension. (Maybe create a *.ini file or use docker-php-ext-enable)

The library is installed in the following steps.

Be sure to keep the Extension and Library the same version.

Code conversion with Rector

The colopl/colopl_bc package contains Rector rules to convert your code to the functions provided by the existing ext-colopl_bc. This can be utilized to save time when dealing with large code bases.

For each rule, check the rule definition file src/Rector. The most common configuration for migrating from PHP 7.x to 8.x is as follows:

API references

INI directives

colopl_bc.php74.compare_mode (default: 0)

Sets the compatibility check mode for various comparison operators (e.g. ==).

It does not perform compatibility checks and always uses the results of older behavior. Suitable for use in production environments.

Compares the result with the result of a native PHP operator and raises an error equivalent to E_DEPRECATED if the results are different.

Compares the results of native PHP operators and sends a log to the running SAPI if the results are different.

colopl_bc.php74.sort_mode (default: 0)

Sets the compatibility check mode for various unstable sort algorithms.

It does not perform compatibility checks and always uses the results of older behavior. Suitable for use in production environments.

Compares the result with the result of a native PHP function and raises an error equivalent to E_DEPRECATED if the results are different.

Compares the results of native PHP functions and sends a log to the running SAPI if the results are different.

Constants

Please check the settings of the corresponding ini directives.

Functions

Sorting is performed using the previous unstable sorting algorithm.

These compatibilities can also be checked at runtime. See the colopl_bc.php74.sort_mode INI directive for details.

These functions use older comparison algorithms than PHP 8.0 for their internal use.

These compatibilities can also be checked at runtime. See the colopl_bc.php74.compare_mode INI directive for details.

For the corresponding comparison operator, returns results that reproduce the older behavior.

These compatibilities can also be checked at runtime. See the colopl_bc.php74.compare_mode INI directive for details.

Seed random numbers.

[!WARNING] srand() provided by colopl_bc are based on the glibc srand() / rand() algorithm. The results may differ from those of the non glibc environments, e.g. Alpine Linux.

Generate random numbers.

[!WARNING] rand() provided by colopl_bc are based on the glibc srand() / rand() algorithm. The results may differ from those of the non glibc environments, e.g. Alpine Linux.

Returns the maximum value that can be returned by a call to Colopl\ColoplBc\Php70\rand().

[!WARNING] rand() provided by colopl_bc are based on the glibc srand() / rand() algorithm. The results may differ from those of the non glibc environments, e.g. Alpine Linux.

This function shuffles (randomizes the order of the elements in) an array.

[!WARNING] shuffle() use Colopl\ColoplBc\Php70\rand() algorithm internally, by colopl_bc are based on the glibc srand() / rand() algorithm. The results may differ from those of the non glibc environments, e.g. Alpine Linux.

str_shuffle() shuffles a string. One permutation of all possible is created.

[!WARNING] str_shuffle() use Colopl\ColoplBc\Php70\rand() algorighm internally, by colopl_bc are based on the glibc srand() / rand() algorithm. The results may differ from those of the non glibc environments, e.g. Alpine Linux.

Picks one or more random entries out of an array, and returns the key (or keys) of the random entries.

[!WARNING] array_rand() use Colopl\ColoplBc\Php70\rand() algorithm internally, by colopl_bc are based on the glibc srand() / rand() algorithm. The results may differ from those of the non glibc environments, e.g. Alpine Linux.

Always initialize the state using a broken Mersenne twister.

Generate random numbers.

[!WARNING] This function previously caused undefined behavior and returned different results depending on the CPU architecture. The current behavior is forced to mimic the gcc + amd64 results, and may return different results for PHP in other environments.

Always instantiate DateTime without milliseconds.


All versions of colopl_bc with dependencies

PHP Build Version
Package Version
Requires php Version ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package colopl/colopl_bc contains the following files

Loading the files please wait ....