bzcompress
Function • Params and return types changed in PHP 8.0
Compress a string into bzip2 encoded data.
bzcompress Function synopsis
bzcompress(
string $data,
int $block_size = 4,
int $work_factor = 0
): string|int
Parameters
$data
Typestring
$block_size
OptionalTypeintDefault value4
$work_factor
OptionalTypeintDefault value0
Return value
Typestring|int
Changes to the bzcompress Function
PHP 8.0
- Return type added:
string|int - Parameter name of parameter #1 changed:
$sourceto$data - Parameter type added for parameter #1 (
$data):string - Parameter name of parameter #2 changed:
$blocksizeto$block_size - Parameter type added for parameter #2 (
$block_size):int - Parameter default value added for position #2 (
$block_size):4 - Parameter name of parameter #3 changed:
$workfactorto$work_factor - Parameter type added for parameter #3 (
$work_factor):int - Parameter default value added for position #3 (
$work_factor):0
bzcompress(
- $source,
+ string $data,
- $blocksize,
+ int $block_size = 4,
- $workfactor
+ int $work_factor = 0
- )
+ ): string|int bzcompress Function Availability
bzcompress Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Upcoming Release | Yes |
| PHP 8.5Supported (Latest) | Yes |
| PHP 8.4Supported | Yes |
| PHP 8.3Security-Fixes Only | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Unsupported | Yes |
| PHP 8.0Unsupported | Yes |
| PHP 7.4Unsupported | Yes |
| PHP 7.3Unsupported | Yes |
| PHP 7.2Unsupported | Yes |
| PHP 7.1Unsupported | Yes |
| PHP 7.0Unsupported | Yes |
| PHP 5.6Unsupported | Yes |
| PHP 5.5Unsupported | Yes |
| PHP 5.4Unsupported | Yes |
| PHP 5.3Unsupported | Yes |