Skip to content

Commit d4a9cc8

Browse files
authored
Fix rc info of iterator_to_array (#9080)
This function can now return a copy of the provided array, resulting in a value of RC != 1.
1 parent 067a302 commit d4a9cc8

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

Zend/Optimizer/zend_func_infos.h

-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,6 @@ static const func_info_t func_infos[] = {
444444
F1("class_uses", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
445445
F1("spl_classes", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING),
446446
F1("spl_object_hash", MAY_BE_STRING),
447-
F1("iterator_to_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF),
448447
F1("ob_get_flush", MAY_BE_STRING|MAY_BE_FALSE),
449448
F1("ob_get_clean", MAY_BE_STRING|MAY_BE_FALSE),
450449
F1("ob_list_handlers", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),

ext/spl/php_spl.stub.php

-1
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,4 @@ function iterator_apply(Traversable $iterator, callable $callback, ?array $args
5050

5151
function iterator_count(iterable $iterator): int {}
5252

53-
/** @refcount 1 */
5453
function iterator_to_array(iterable $iterator, bool $preserve_keys = true): array {}

ext/spl/php_spl_arginfo.h

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)