Skip to content

Commit 1d8e6ba

Browse files
authored
Automatically regenerate the files
1 parent e661d5d commit 1d8e6ba

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

generated/stream.php

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,31 @@ function stream_context_set_params($context, array $params): void
2424

2525

2626
/**
27-
* Makes a copy of up to maxlength bytes
27+
* Makes a copy of up to length bytes
2828
* of data from the current position (or from the
2929
* offset position, if specified) in
30-
* source to dest. If
31-
* maxlength is not specified, all remaining content in
32-
* source will be copied.
30+
* from to to. If
31+
* length is NULL, all remaining content in
32+
* from will be copied.
3333
*
34-
* @param resource $source The source stream
35-
* @param resource $dest The destination stream
36-
* @param int $maxlength Maximum bytes to copy
34+
* @param resource $from The source stream
35+
* @param resource $to The destination stream
36+
* @param int $length Maximum bytes to copy. By default all bytes left are copied.
3737
* @param int $offset The offset where to start to copy data
3838
* @return int Returns the total count of bytes copied.
3939
* @throws StreamException
4040
*
4141
*/
42-
function stream_copy_to_stream($source, $dest, int $maxlength = -1, int $offset = 0): int
42+
function stream_copy_to_stream($from, $to, int $length = null, int $offset = 0): int
4343
{
4444
error_clear_last();
45-
$result = \stream_copy_to_stream($source, $dest, $maxlength, $offset);
45+
if ($offset !== 0) {
46+
$result = \stream_copy_to_stream($from, $to, $length, $offset);
47+
} elseif ($length !== null) {
48+
$result = \stream_copy_to_stream($from, $to, $length);
49+
} else {
50+
$result = \stream_copy_to_stream($from, $to);
51+
}
4652
if ($result === false) {
4753
throw StreamException::createFromPhpError();
4854
}

generated/zlib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,12 @@ function gzgetss($zp, int $length, string $allowable_tags = null): string
346346
* This function inflates a deflated string.
347347
*
348348
* @param string $data The data compressed by gzdeflate.
349-
* @param int $max_length The maximum length of data to decode.
349+
* @param int $max_length The maximum length of decoded data.
350350
* @return string The original uncompressed data.
351351
*
352352
* The function will return an error if the uncompressed data is more than
353353
* 32768 times the length of the compressed input data
354-
* or more than the optional parameter max_length.
354+
* or, unless max_length is 0, more than the optional parameter max_length.
355355
* @throws ZlibException
356356
*
357357
*/

0 commit comments

Comments
 (0)