Function __global->fgets
Definitions
sources_custom/phpstub.php
- Gets line from file pointer.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $handle | resource | No | No | required parameter | N/A | N/A | The file pointer |
| $length | ?integer | No | No | Null | N/A | N/A | The maximum length of the line (null: no limit) |
Returns
- The string read (false: error)
- Type: ~string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Gets line from file pointer.
*
* @param resource $handle The file pointer
* @param ?integer $length The maximum length of the line (null: no limit)
* @return ~string The string read (false: error)
*/
function fgets($handle, ?int $length = null)
* Gets line from file pointer.
*
* @param resource $handle The file pointer
* @param ?integer $length The maximum length of the line (null: no limit)
* @return ~string The string read (false: error)
*/
function fgets($handle, ?int $length = null)

