Function __global->stream_get_contents
Definitions
sources_custom/phpstub.php
- Reads remainder of a stream into a string.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $handle | resource | No | No | required parameter | N/A | N/A | A stream resource |
| $maxlength | integer | No | No | -1 | N/A | N/A | The maximum bytes to read (-1: no limit) |
| $offset | integer | No | No | -1 | N/A | N/A | Seek to the specified offset before reading. If this number is negative, no seeking will occur and reading will start from the current position |
Returns
- Contents
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Reads remainder of a stream into a string.
*
* @param resource $handle A stream resource
* @param integer $maxlength The maximum bytes to read (-1: no limit)
* @param integer $offset Seek to the specified offset before reading. If this number is negative, no seeking will occur and reading will start from the current position
* @return string Contents
*/
function stream_get_contents($handle, int $maxlength = -1, int $offset = -1) : string
* Reads remainder of a stream into a string.
*
* @param resource $handle A stream resource
* @param integer $maxlength The maximum bytes to read (-1: no limit)
* @param integer $offset Seek to the specified offset before reading. If this number is negative, no seeking will occur and reading will start from the current position
* @return string Contents
*/
function stream_get_contents($handle, int $maxlength = -1, int $offset = -1) : string

