CascadiaPHP 2024

stream_bucket_make_writeable

(PHP 5, PHP 7, PHP 8)

stream_bucket_make_writeable Returns a bucket object from the brigade to operate on

Description

stream_bucket_make_writeable(resource $brigade): ?object

This function is called whenever there is the need to access and operate on the content contains in a brigade. It is typically called from php_user_filter::filter().

Parameters

brigade

The brigade to return a bucket object from.

Return Values

Returns a bucket object with the properties listed below or null.

data (string)

data bucket The current string in the bucket.

datalen (integer)

datalen bucket The length of the string in the bucket.

See Also

add a note

User Contributed Notes 2 notes

up
0
Shane Thompson
25 days ago
Note this function is spelled "writeable", not "writable". Some functions have aliases for both (i.e. is_writable vs is_writeable), whereas this function does not.

The alias stream_bucket_make_writable simply does not yet exist.
up
0
Anonymous
1 year ago
the object $bucket which is returned also includes a third parameter, $bucket->bucket, which is a reference to the resource
To Top