If no value is passed, this reads as much as necessary, not 1024
bytes.
function fgetc($handle): string|false {}
/** @param resource $handle */
-function fgets($handle, int $length = 1024): string|false {}
+function fgets($handle, int $length = UNKNOWN): string|false {}
/** @param resource $handle */
function fread($handle, int $length): string|false {}
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fgets, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_INFO(0, handle)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1024")
+ ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fread, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)