Skip to content

Commit 8e6e983

Browse files
authored
Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416)
1 parent 96c3465 commit 8e6e983

19 files changed

+87
-46
lines changed

Zend/Optimizer/zend_func_info.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ static uint32_t zend_range_info(const zend_call_info *call_info, const zend_ssa
8888
}
8989

9090
static const func_info_t old_func_infos[] = {
91-
/* zend */
92-
F1("get_class_vars", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
93-
F1("get_defined_vars", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
94-
9591
/* ext/standard */
9692
F1("parse_ini_file", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
9793
F1("parse_ini_string", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
@@ -165,18 +161,8 @@ static const func_info_t old_func_infos[] = {
165161
F1("stream_bucket_new", MAY_BE_OBJECT),
166162
F1("sys_get_temp_dir", MAY_BE_STRING),
167163

168-
/* ext/preg */
169-
F1("preg_grep", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
170-
171164
F1("utf8_encode", MAY_BE_STRING),
172165
F1("utf8_decode", MAY_BE_STRING),
173-
174-
/* ext/filter */
175-
F1("filter_var_array", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
176-
177-
/* ext/spl */
178-
F1("iterator_to_array", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
179-
180166
};
181167

182168
static HashTable func_info;

Zend/Optimizer/zend_func_infos.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
static const func_info_t func_infos[] = {
44
F1("zend_version", MAY_BE_STRING),
55
FN("func_get_args", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_ANY),
6+
F1("get_class_vars", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF),
67
F1("get_class_methods", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
78
F1("get_included_files", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
89
FN("set_error_handler", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_OBJECT|MAY_BE_NULL),
@@ -13,6 +14,7 @@ static const func_info_t func_infos[] = {
1314
F1("get_declared_traits", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
1415
F1("get_declared_interfaces", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
1516
F1("get_defined_functions", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ARRAY),
17+
F1("get_defined_vars", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF),
1618
F1("get_resource_type", MAY_BE_STRING),
1719
F1("get_loaded_extensions", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
1820
F1("get_defined_constants", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY),
@@ -80,7 +82,8 @@ static const func_info_t func_infos[] = {
8082
F1("finfo_file", MAY_BE_STRING|MAY_BE_FALSE),
8183
F1("finfo_buffer", MAY_BE_STRING|MAY_BE_FALSE),
8284
F1("mime_content_type", MAY_BE_STRING|MAY_BE_FALSE),
83-
F1("filter_input_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE|MAY_BE_NULL),
85+
F1("filter_input_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_FALSE|MAY_BE_NULL),
86+
F1("filter_var_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_FALSE|MAY_BE_NULL),
8487
F1("filter_list", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
8588
F1("gd_info", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_FALSE|MAY_BE_ARRAY_OF_TRUE),
8689
F1("imagecreatetruecolor", MAY_BE_OBJECT|MAY_BE_FALSE),
@@ -328,6 +331,7 @@ static const func_info_t func_infos[] = {
328331
FN("preg_filter", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_NULL),
329332
FN("preg_replace_callback", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_NULL),
330333
F1("preg_split", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_FALSE),
334+
F1("preg_grep", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_FALSE),
331335
F1("pg_dbname", MAY_BE_STRING),
332336
F1("pg_options", MAY_BE_STRING),
333337
F1("pg_port", MAY_BE_STRING),
@@ -363,7 +367,7 @@ static const func_info_t func_infos[] = {
363367
F1("pg_result_error_field", MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL),
364368
F1("pg_get_result", MAY_BE_OBJECT|MAY_BE_FALSE),
365369
F1("pg_result_status", MAY_BE_STRING|MAY_BE_LONG),
366-
F1("pg_get_notify", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE),
370+
F1("pg_get_notify", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY),
367371
F1("pg_socket", MAY_BE_RESOURCE|MAY_BE_FALSE),
368372
F1("pg_meta_data", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_FALSE),
369373
F1("pg_convert", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE),
@@ -387,6 +391,7 @@ static const func_info_t func_infos[] = {
387391
F1("class_uses", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
388392
F1("spl_classes", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING),
389393
F1("spl_object_hash", MAY_BE_STRING),
394+
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),
390395
F1("base64_encode", MAY_BE_STRING),
391396
F1("base64_decode", MAY_BE_STRING|MAY_BE_FALSE),
392397
F1("long2ip", MAY_BE_STRING|MAY_BE_FALSE),

Zend/zend_builtin_functions.stub.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ function is_subclass_of(mixed $object_or_class, string $class, bool $allow_strin
4444
/** @param object|string $object_or_class */
4545
function is_a(mixed $object_or_class, string $class, bool $allow_string = false): bool {}
4646

47+
/**
48+
* @return array<string, mixed|ref>
49+
* @refcount 1
50+
*/
4751
function get_class_vars(string $class): array {}
4852

4953
function get_object_vars(object $object): array {}
@@ -127,6 +131,10 @@ function get_declared_interfaces(): array {}
127131
*/
128132
function get_defined_functions(bool $exclude_disabled = true): array {}
129133

134+
/**
135+
* @return array<string, mixed|ref>
136+
* @refcount 1
137+
*/
130138
function get_defined_vars(): array {}
131139

132140
/**

Zend/zend_builtin_functions_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 830eee0780adba8fc87cd5aed7f755d4d85ed82b */
2+
* Stub hash: f87d92c002674c431827895a8d8b3a5da3b95482 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_version, 0, 0, IS_STRING, 0)
55
ZEND_END_ARG_INFO()

build/gen_stub.php

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class ArrayType extends SimpleType {
122122

123123
public static function createGenericArray(): self
124124
{
125-
return new ArrayType(Type::fromString("int|string"), Type::fromString("mixed"));
125+
return new ArrayType(Type::fromString("int|string"), Type::fromString("mixed|ref"));
126126
}
127127

128128
public function __construct(Type $keyType, Type $valueType)
@@ -205,6 +205,7 @@ public static function fromString(string $typeString): SimpleType
205205
case "mixed":
206206
case "static":
207207
case "never":
208+
case "ref":
208209
return new SimpleType(strtolower($typeString), true);
209210
case "array":
210211
return ArrayType::createGenericArray();
@@ -358,6 +359,8 @@ public function toOptimizerTypeMaskForArrayValue(): string {
358359
return "MAY_BE_ARRAY_OF_RESOURCE";
359360
case "mixed":
360361
return "MAY_BE_ARRAY_OF_ANY";
362+
case "ref":
363+
return "MAY_BE_ARRAY_OF_REF";
361364
default:
362365
throw new Exception("Type $this->name cannot be an array value");
363366
}
@@ -397,23 +400,20 @@ class Type {
397400
/** @var SimpleType[] */
398401
public $types;
399402

400-
/**
401-
* @param SimpleType[] $types
402-
*/
403-
public function __construct(array $types) {
404-
$this->types = $types;
405-
}
406-
407403
public static function fromNode(Node $node): Type {
408404
if ($node instanceof Node\UnionType) {
409405
return new Type(array_map(['SimpleType', 'fromNode'], $node->types));
410406
}
407+
411408
if ($node instanceof Node\NullableType) {
412-
return new Type([
413-
SimpleType::fromNode($node->type),
414-
SimpleType::null(),
415-
]);
409+
return new Type(
410+
[
411+
SimpleType::fromNode($node->type),
412+
SimpleType::null(),
413+
]
414+
);
416415
}
416+
417417
return new Type([SimpleType::fromNode($node)]);
418418
}
419419

@@ -443,6 +443,7 @@ public static function fromString(string $typeString): self {
443443

444444
if ($char === "|") {
445445
$simpleTypeName = trim(substr($typeString, $simpleTypeOffset, $i - $simpleTypeOffset));
446+
446447
$simpleTypes[] = SimpleType::fromString($simpleTypeName);
447448

448449
$simpleTypeOffset = $i + 1;
@@ -452,6 +453,13 @@ public static function fromString(string $typeString): self {
452453
return new Type($simpleTypes);
453454
}
454455

456+
/**
457+
* @param SimpleType[] $types
458+
*/
459+
private function __construct(array $types) {
460+
$this->types = $types;
461+
}
462+
455463
public function isScalar(): bool {
456464
foreach ($this->types as $type) {
457465
if (!$type->isScalar()) {
@@ -473,9 +481,14 @@ public function isNullable(): bool {
473481
}
474482

475483
public function getWithoutNull(): Type {
476-
return new Type(array_filter($this->types, function(SimpleType $type) {
477-
return !$type->isNull();
478-
}));
484+
return new Type(
485+
array_filter(
486+
$this->types,
487+
function(SimpleType $type) {
488+
return !$type->isNull();
489+
}
490+
)
491+
);
479492
}
480493

481494
public function tryToSimpleType(): ?SimpleType {

ext/date/php_date.stub.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ function timezone_name_from_abbr(string $abbr, int $utcOffset = -1, int $isDST =
123123

124124
function timezone_offset_get(DateTimeZone $object, DateTimeInterface $datetime): int {}
125125

126-
/** @refcount 1 */
126+
/**
127+
* @return array<int|string, mixed>|false
128+
* @refcount 1
129+
*/
127130
function timezone_transitions_get(
128131
DateTimeZone $object, int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX): array|false {}
129132

@@ -411,6 +414,7 @@ public function getName(): string {}
411414
public function getOffset(DateTimeInterface $datetime): int {}
412415

413416
/**
417+
* @return array<int|string, mixed>|false
414418
* @tentative-return-type
415419
* @alias timezone_transitions_get
416420
*/

ext/date/php_date_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 0f3ef0e61bf6b00a4e33375282097b3dfa51da66 */
2+
* Stub hash: e4821eb3a38823fe1aee397d8e949fdcaa570a4f */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)

ext/filter/filter.stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function filter_var(mixed $value, int $filter = FILTER_DEFAULT, array|int $optio
1111
/** @refcount 1 */
1212
function filter_input_array(int $type, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {}
1313

14+
/** @refcount 1 */
1415
function filter_var_array(array $array, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {}
1516

1617
/**

ext/filter/filter_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 28ff4549a3e25c103a172624b8e25c6cd1912379 */
2+
* Stub hash: 7623236b3b620e6a0e9f06615334392ab0bfce14 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_has_var, 0, 2, _IS_BOOL, 0)
55
ZEND_ARG_TYPE_INFO(0, input_type, IS_LONG, 0)

ext/mbstring/mbstring.stub.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ function mb_strwidth(string $string, ?string $encoding = null): int {}
7272
/** @refcount 1 */
7373
function mb_strimwidth(string $string, int $start, int $width, string $trim_marker = "", ?string $encoding = null): string {}
7474

75-
/** @refcount 1 */
75+
/**
76+
* @return array<int|string, mixed>|string|false
77+
* @refcount 1
78+
*/
7679
function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null): array|string|false {}
7780

7881
/** @refcount 1 */

ext/mbstring/mbstring_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: b4709ffa2a2f993e3d280c5cd6fd731b58d4d9a6 */
2+
* Stub hash: e553c28d2afd54f1ffcdbb0363aaa2079fabe07d */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, language, IS_STRING, 1, "null")

ext/mysqli/mysqli.stub.php

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ public function get_client_info(): string {}
141141

142142
#if defined(MYSQLI_USE_MYSQLND)
143143
/**
144+
* @return array<int|string, mixed>
144145
* @tentative-return-type
145146
* @alias mysqli_get_connection_stats
146147
*/
@@ -401,18 +402,21 @@ public function fetch_fields(): array {}
401402
public function fetch_field_direct(int $index): object|false {}
402403

403404
/**
405+
* @return array<int|string, mixed>
404406
* @tentative-return-type
405407
* @alias mysqli_fetch_all
406408
*/
407409
public function fetch_all(int $mode = MYSQLI_NUM): array {}
408410

409411
/**
412+
* @return array<int|string, mixed>|null|false
410413
* @tentative-return-type
411414
* @alias mysqli_fetch_array
412415
*/
413416
public function fetch_array(int $mode = MYSQLI_BOTH): array|null|false {}
414417

415418
/**
419+
* @return array<int|string, mixed>|null|false
416420
* @tentative-return-type
417421
* @alias mysqli_fetch_assoc
418422
*/
@@ -684,13 +688,22 @@ function mysqli_fetch_field_direct(mysqli_result $result, int $index): object|fa
684688
*/
685689
function mysqli_fetch_lengths(mysqli_result $result): array|false {}
686690

687-
/** @refcount 1 */
691+
/**
692+
* @return array<int|string, mixed>
693+
* @refcount 1
694+
*/
688695
function mysqli_fetch_all(mysqli_result $result, int $mode = MYSQLI_NUM): array {}
689696

690-
/** @refcount 1 */
697+
/**
698+
* @return array<int|string, mixed>|null|false
699+
* @refcount 1
700+
*/
691701
function mysqli_fetch_array(mysqli_result $result, int $mode = MYSQLI_BOTH): array|null|false {}
692702

693-
/** @refcount 1 */
703+
/**
704+
* @return array<int|string, mixed>|null|false
705+
* @refcount 1
706+
*/
694707
function mysqli_fetch_assoc(mysqli_result $result): array|null|false {}
695708

696709
/** @refcount 1 */
@@ -713,7 +726,10 @@ function mysqli_field_tell(mysqli_result $result): int {}
713726
function mysqli_free_result(mysqli_result $result): void {}
714727

715728
#if defined(MYSQLI_USE_MYSQLND)
716-
/** @refcount 1 */
729+
/**
730+
* @return array<int|string, mixed>
731+
* @refcount 1
732+
*/
717733
function mysqli_get_connection_stats(mysqli $mysql): array {}
718734

719735
/**

ext/mysqli/mysqli_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 11628afb5c66778bfd89890fdf182947383e59c1 */
2+
* Stub hash: be02e12b8984705bcaae9ce16a1e90cb64af5784 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING)
55
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)

ext/pcre/php_pcre.stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ function preg_split(string $pattern, string $subject, int $limit = -1, int $flag
3737

3838
function preg_quote(string $str, ?string $delimiter = null): string {}
3939

40+
/** @refcount 1 */
4041
function preg_grep(string $pattern, array $array, int $flags = 0): array|false {}
4142

4243
function preg_last_error(): int {}

ext/pcre/php_pcre_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 5d7958a9f83b19eef0bffdf631ddb47cae28733f */
2+
* Stub hash: 62ab532c890b5421bfe8b784c803829cf71a1423 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_match, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)

ext/pgsql/pgsql.stub.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,10 @@ function pg_get_result(PgSql\Connection $connection): PgSql\Result|false {}
469469
/** @refcount 1 */
470470
function pg_result_status(PgSql\Result $result, int $mode = PGSQL_STATUS_LONG): string|int {}
471471

472-
/** @refcount 1 */
472+
/**
473+
* @return array<int|string, mixed>
474+
* @refcount 1
475+
*/
473476
function pg_get_notify(PgSql\Connection $connection, int $mode = PGSQL_ASSOC): array|false {}
474477

475478
function pg_get_pid(PgSql\Connection $connection): int {}

ext/pgsql/pgsql_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: fef54d6edd292e005e1db070c5347a8177bc804a */
2+
* Stub hash: 23cb6cbb27e6ecf00c5ad4d18e6e8869a33a86bf */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_connect, 0, 1, PgSql\\Connection, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0)

ext/spl/php_spl.stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ function iterator_apply(Traversable $iterator, callable $callback, ?array $args
5050

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

53+
/** @refcount 1 */
5354
function iterator_to_array(Traversable $iterator, bool $preserve_keys = true): array {}

ext/spl/php_spl_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 20188120387b006ea0e5833ad20241b73d2e2327 */
2+
* Stub hash: 7359e9e5aa07c00d0e0be2642f11c1131a17e61e */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_implements, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
55
ZEND_ARG_INFO(0, object_or_class)

0 commit comments

Comments
 (0)