stream_bucket_new()

stream_bucket_new() — Create a new bucket for use on the current stream.

Built-in function of PHP 8.5. The manual lists it as available in PHP 5, PHP 7, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.

What it does

This function is currently not documented; only its argument list is available.

Signature

stream_bucket_new(resource $stream, string $buffer): StreamBucket

Parameters

This function takes no parameters.

Return value

See the PHP manual for the return value.

Example

The PHP manual ships no example for stream_bucket_new(); the signature and the parameter table above are the contract.

Changelog

VersionChange
8.4.0This function returns a StreamBucket instance now; previously, an stdClass was returned.

All PHP 8.5 built-in functions

Reference card built from the PHP manual page stream_bucket_new() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.