Skip to content

Commit f637118

Browse files
committed
extract() cannot return null anymore
1 parent d86262a commit f637118

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ext/standard/array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2427,7 +2427,7 @@ static zend_long php_extract_skip(zend_array *arr, zend_array *symbol_table) /*
24272427
}
24282428
/* }}} */
24292429

2430-
/* {{{ proto int|null extract(array var_array [, int extract_type [, string prefix]])
2430+
/* {{{ proto int extract(array var_array [, int extract_type [, string prefix]])
24312431
Imports variables into symbol table from an array */
24322432
PHP_FUNCTION(extract)
24332433
{

ext/standard/basic_functions.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function in_array($needle, array $haystack, bool $strict = false): bool {}
139139
function array_search($needle, array $haystack, bool $strict = false) {}
140140

141141
/** @prefer-ref $arg */
142-
function extract(array &$arg, int $extract_type = EXTR_OVERWRITE, string $prefix = ""): ?int {}
142+
function extract(array &$arg, int $extract_type = EXTR_OVERWRITE, string $prefix = ""): int {}
143143

144144
function compact($var_name, ...$var_names): array {}
145145

ext/standard/basic_functions_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_array_search, 0, 0, 2)
150150
ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0)
151151
ZEND_END_ARG_INFO()
152152

153-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_extract, 0, 1, IS_LONG, 1)
153+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_extract, 0, 1, IS_LONG, 0)
154154
ZEND_ARG_TYPE_INFO(ZEND_SEND_PREFER_REF, arg, IS_ARRAY, 0)
155155
ZEND_ARG_TYPE_INFO(0, extract_type, IS_LONG, 0)
156156
ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0)

0 commit comments

Comments
 (0)