Skip to content

Commit 68946bd

Browse files
authored
Generate optimizer func info from stubs for ext/gd and ext/pgsql (#7408)
1 parent 7d3cdb3 commit 68946bd

File tree

6 files changed

+255
-108
lines changed

6 files changed

+255
-108
lines changed

Zend/Optimizer/zend_func_info.c

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -428,103 +428,9 @@ static const func_info_t old_func_infos[] = {
428428
F1("mhash_get_hash_name", MAY_BE_FALSE | MAY_BE_STRING),
429429
F1("mhash", MAY_BE_FALSE | MAY_BE_FALSE | MAY_BE_STRING),
430430

431-
/* ext/pgsql */
432-
F1("pg_dbname", MAY_BE_STRING),
433-
F1("pg_options", MAY_BE_STRING),
434-
F1("pg_port", MAY_BE_STRING),
435-
F1("pg_tty", MAY_BE_STRING),
436-
F1("pg_host", MAY_BE_STRING),
437-
F1("pg_version", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_NULL),
438-
F1("pg_parameter_status", MAY_BE_FALSE | MAY_BE_STRING),
439-
F1("pg_query", MAY_BE_FALSE | MAY_BE_OBJECT),
440-
F1("pg_query_params", MAY_BE_FALSE | MAY_BE_OBJECT),
441-
F1("pg_prepare", MAY_BE_FALSE | MAY_BE_OBJECT),
442-
F1("pg_execute", MAY_BE_FALSE | MAY_BE_OBJECT),
443-
FN("pg_last_notice", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY ),
444-
F1("pg_field_name", MAY_BE_STRING),
445-
F1("pg_field_type_oid", MAY_BE_LONG | MAY_BE_STRING),
446-
F1("pg_fetch_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
447-
F1("pg_fetch_row", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
448-
F1("pg_fetch_assoc", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
449-
F1("pg_fetch_array", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
450-
F1("pg_fetch_object", MAY_BE_FALSE | MAY_BE_OBJECT),
451-
F1("pg_fetch_all", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY),
452-
F1("pg_fetch_all_columns", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
453-
F1("pg_last_oid", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING),
454-
F1("pg_lo_create", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING),
455-
F1("pg_lo_open", MAY_BE_FALSE | MAY_BE_OBJECT),
456-
F1("pg_lo_read", MAY_BE_FALSE | MAY_BE_STRING),
457-
F1("pg_lo_import", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING),
458-
F1("pg_copy_to", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
459-
F1("pg_escape_string", MAY_BE_STRING),
460-
F1("pg_escape_bytea", MAY_BE_STRING),
461-
F1("pg_unescape_bytea", MAY_BE_STRING),
462-
F1("pg_escape_literal", MAY_BE_FALSE | MAY_BE_STRING),
463-
F1("pg_escape_identifier", MAY_BE_FALSE | MAY_BE_STRING),
464-
F1("pg_result_error", MAY_BE_FALSE | MAY_BE_STRING),
465-
F1("pg_result_error_field", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
466-
F1("pg_get_result", MAY_BE_FALSE | MAY_BE_OBJECT),
467-
F1("pg_result_status", MAY_BE_LONG | MAY_BE_STRING),
468-
F1("pg_get_notify", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
469-
F1("pg_meta_data", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ARRAY),
470-
F1("pg_convert", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
471-
F1("pg_insert", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_OBJECT | MAY_BE_STRING),
472-
F1("pg_update", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
473-
F1("pg_delete", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
474-
F1("pg_select", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY),
475-
476431
/* ext/filter */
477432
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),
478433

479-
/* ext/gd */
480-
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),
481-
F1("imagecreatetruecolor", MAY_BE_FALSE | MAY_BE_OBJECT),
482-
#ifdef PHP_WIN32
483-
F1("imagegrabwindow", MAY_BE_FALSE | MAY_BE_OBJECT),
484-
F1("imagegrabscreen", MAY_BE_FALSE | MAY_BE_OBJECT),
485-
#endif
486-
F1("imagerotate", MAY_BE_FALSE | MAY_BE_OBJECT),
487-
F1("imagecreate", MAY_BE_FALSE | MAY_BE_OBJECT),
488-
F1("imagecreatefromstring", MAY_BE_FALSE | MAY_BE_OBJECT),
489-
F1("imagecreatefromgif", MAY_BE_FALSE | MAY_BE_OBJECT),
490-
#ifdef HAVE_GD_JPG
491-
F1("imagecreatefromjpeg", MAY_BE_FALSE | MAY_BE_OBJECT),
492-
#endif
493-
#ifdef HAVE_GD_AVIF
494-
F1("imagecreatefromavif", MAY_BE_FALSE | MAY_BE_OBJECT),
495-
#endif
496-
#ifdef HAVE_GD_PNG
497-
F1("imagecreatefrompng", MAY_BE_FALSE | MAY_BE_OBJECT),
498-
#endif
499-
#ifdef HAVE_GD_WEBP
500-
F1("imagecreatefromwebp", MAY_BE_FALSE | MAY_BE_OBJECT),
501-
#endif
502-
F1("imagecreatefromxbm", MAY_BE_FALSE | MAY_BE_OBJECT),
503-
#if defined(HAVE_GD_XPM)
504-
F1("imagecreatefromxpm", MAY_BE_FALSE | MAY_BE_OBJECT),
505-
#endif
506-
F1("imagecreatefromwbmp", MAY_BE_FALSE | MAY_BE_OBJECT),
507-
F1("imagecreatefromgd", MAY_BE_FALSE | MAY_BE_OBJECT),
508-
F1("imagecreatefromgd2", MAY_BE_FALSE | MAY_BE_OBJECT),
509-
F1("imagecreatefromgd2part", MAY_BE_FALSE | MAY_BE_OBJECT),
510-
#if defined(HAVE_GD_BMP)
511-
F1("imagecreatefrombmp", MAY_BE_FALSE | MAY_BE_OBJECT),
512-
#endif
513-
F0("imagecolorset", MAY_BE_NULL | MAY_BE_FALSE),
514-
F1("imagecolorsforindex", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG),
515-
F1("imagegetclip", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
516-
F1("imageftbbox", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
517-
F1("imagefttext", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
518-
F1("imagettfbbox", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
519-
F1("imagettftext", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
520-
F1("imagecrop", MAY_BE_FALSE | MAY_BE_OBJECT),
521-
F1("imagecropauto", MAY_BE_FALSE | MAY_BE_OBJECT),
522-
F1("imagescale", MAY_BE_FALSE | MAY_BE_OBJECT),
523-
F1("imageaffine", MAY_BE_FALSE | MAY_BE_OBJECT),
524-
F1("imageaffinematrixget", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_DOUBLE),
525-
F1("imageaffinematrixconcat", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_DOUBLE),
526-
F1("imageresolution", MAY_BE_TRUE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
527-
528434
/* ext/spl */
529435
F1("iterator_to_array", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
530436

Zend/Optimizer/zend_func_infos.h

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,100 @@ static const func_info_t func_infos[] = {
212212
F1("exif_tagname", MAY_BE_STRING|MAY_BE_FALSE),
213213
F1("exif_read_data", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE),
214214
F1("exif_thumbnail", MAY_BE_STRING|MAY_BE_FALSE),
215+
F1("pg_dbname", MAY_BE_STRING),
216+
F1("pg_options", MAY_BE_STRING),
217+
F1("pg_port", MAY_BE_STRING),
218+
F1("pg_tty", MAY_BE_STRING),
219+
F1("pg_host", MAY_BE_STRING),
220+
F1("pg_version", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL),
221+
F1("pg_parameter_status", MAY_BE_STRING|MAY_BE_FALSE),
222+
F1("pg_query", MAY_BE_OBJECT|MAY_BE_FALSE),
223+
F1("pg_query_params", MAY_BE_OBJECT|MAY_BE_FALSE),
224+
F1("pg_prepare", MAY_BE_OBJECT|MAY_BE_FALSE),
225+
F1("pg_execute", MAY_BE_OBJECT|MAY_BE_FALSE),
226+
F1("pg_field_name", MAY_BE_STRING),
227+
F1("pg_field_type_oid", MAY_BE_STRING|MAY_BE_LONG),
228+
F1("pg_fetch_result", MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL),
229+
F1("pg_fetch_row", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL|MAY_BE_FALSE),
230+
F1("pg_fetch_assoc", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL|MAY_BE_FALSE),
231+
F1("pg_fetch_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL|MAY_BE_FALSE),
232+
F1("pg_fetch_object", MAY_BE_OBJECT|MAY_BE_FALSE),
233+
F1("pg_fetch_all", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_ARRAY),
234+
F1("pg_fetch_all_columns", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL),
235+
F1("pg_last_oid", MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE),
236+
F1("pg_lo_create", MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE),
237+
F1("pg_lo_open", MAY_BE_OBJECT|MAY_BE_FALSE),
238+
F1("pg_lo_read", MAY_BE_STRING|MAY_BE_FALSE),
239+
F1("pg_lo_import", MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE),
240+
F1("pg_copy_to", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
241+
F1("pg_escape_string", MAY_BE_STRING),
242+
F1("pg_escape_bytea", MAY_BE_STRING),
243+
F1("pg_unescape_bytea", MAY_BE_STRING),
244+
F1("pg_escape_literal", MAY_BE_STRING|MAY_BE_FALSE),
245+
F1("pg_escape_identifier", MAY_BE_STRING|MAY_BE_FALSE),
246+
F1("pg_result_error", MAY_BE_STRING|MAY_BE_FALSE),
247+
F1("pg_result_error_field", MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL),
248+
F1("pg_get_result", MAY_BE_OBJECT|MAY_BE_FALSE),
249+
F1("pg_result_status", MAY_BE_STRING|MAY_BE_LONG),
250+
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),
215251
F1("pg_socket", MAY_BE_RESOURCE|MAY_BE_FALSE),
252+
F1("pg_meta_data", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_FALSE),
253+
F1("pg_convert", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE),
254+
F1("pg_insert", MAY_BE_OBJECT|MAY_BE_STRING|MAY_BE_BOOL),
255+
F1("pg_update", MAY_BE_STRING|MAY_BE_BOOL),
256+
F1("pg_delete", MAY_BE_STRING|MAY_BE_BOOL),
257+
F1("pg_select", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_STRING|MAY_BE_FALSE),
258+
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),
259+
F1("imagecreatetruecolor", MAY_BE_OBJECT|MAY_BE_FALSE),
260+
#if defined(PHP_WIN32)
261+
F1("imagegrabwindow", MAY_BE_OBJECT|MAY_BE_FALSE),
262+
#endif
263+
#if defined(PHP_WIN32)
264+
F1("imagegrabscreen", MAY_BE_OBJECT|MAY_BE_FALSE),
265+
#endif
266+
F1("imagerotate", MAY_BE_OBJECT|MAY_BE_FALSE),
267+
F1("imagecreate", MAY_BE_OBJECT|MAY_BE_FALSE),
268+
F1("imagecreatefromstring", MAY_BE_OBJECT|MAY_BE_FALSE),
269+
#if defined(HAVE_GD_AVIF)
270+
F1("imagecreatefromavif", MAY_BE_OBJECT|MAY_BE_FALSE),
271+
#endif
272+
F1("imagecreatefromgif", MAY_BE_OBJECT|MAY_BE_FALSE),
273+
#if defined(HAVE_GD_JPG)
274+
F1("imagecreatefromjpeg", MAY_BE_OBJECT|MAY_BE_FALSE),
275+
#endif
276+
#if defined(HAVE_GD_PNG)
277+
F1("imagecreatefrompng", MAY_BE_OBJECT|MAY_BE_FALSE),
278+
#endif
279+
#if defined(HAVE_GD_WEBP)
280+
F1("imagecreatefromwebp", MAY_BE_OBJECT|MAY_BE_FALSE),
281+
#endif
282+
F1("imagecreatefromxbm", MAY_BE_OBJECT|MAY_BE_FALSE),
283+
#if defined(HAVE_GD_XPM)
284+
F1("imagecreatefromxpm", MAY_BE_OBJECT|MAY_BE_FALSE),
285+
#endif
286+
F1("imagecreatefromwbmp", MAY_BE_OBJECT|MAY_BE_FALSE),
287+
F1("imagecreatefromgd", MAY_BE_OBJECT|MAY_BE_FALSE),
288+
F1("imagecreatefromgd2", MAY_BE_OBJECT|MAY_BE_FALSE),
289+
F1("imagecreatefromgd2part", MAY_BE_OBJECT|MAY_BE_FALSE),
290+
#if defined(HAVE_GD_BMP)
291+
F1("imagecreatefrombmp", MAY_BE_OBJECT|MAY_BE_FALSE),
292+
#endif
293+
F0("imagecolorset", MAY_BE_FALSE|MAY_BE_NULL),
294+
F1("imagecolorsforindex", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG),
295+
F1("imagegetclip", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_LONG),
296+
#if defined(HAVE_GD_FREETYPE)
297+
F1("imageftbbox", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_LONG|MAY_BE_FALSE),
298+
#endif
299+
#if defined(HAVE_GD_FREETYPE)
300+
F1("imagefttext", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_LONG|MAY_BE_FALSE),
301+
#endif
302+
F1("imagecrop", MAY_BE_OBJECT|MAY_BE_FALSE),
303+
F1("imagecropauto", MAY_BE_OBJECT|MAY_BE_FALSE),
304+
F1("imagescale", MAY_BE_OBJECT|MAY_BE_FALSE),
305+
F1("imageaffine", MAY_BE_OBJECT|MAY_BE_FALSE),
306+
F1("imageaffinematrixget", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_DOUBLE|MAY_BE_FALSE),
307+
F1("imageaffinematrixconcat", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_DOUBLE|MAY_BE_FALSE),
308+
F1("imageresolution", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_LONG|MAY_BE_TRUE),
216309
FN("preg_replace", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_NULL),
217310
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),
218311
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),

ext/gd/gd.stub.php

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ final class GdImage {}
1414
*/
1515
final class GdFont {}
1616

17+
/**
18+
* @return array<string, string|bool>
19+
* @refcount 1
20+
*/
1721
function gd_info(): array {}
1822

1923
function imageloadfont(string $filename): GdFont|false {}
2024

2125
function imagesetstyle(GdImage $image, array $style): bool {}
2226

27+
/** @refcount 1 */
2328
function imagecreatetruecolor(int $width, int $height): GdImage|false {}
2429

2530
function imageistruecolor(GdImage $image): bool {}
@@ -54,58 +59,75 @@ function imagecopyresampled(GdImage $dst_image, GdImage $src_image, int $dst_x,
5459

5560
#ifdef PHP_WIN32
5661

62+
/** @refcount 1 */
5763
function imagegrabwindow(int $handle, bool $client_area = false): GdImage|false {}
5864

65+
/** @refcount 1 */
5966
function imagegrabscreen(): GdImage|false {}
6067

6168
#endif
6269

6370
// TODO: $ignore_transparent is ignored???
71+
/** @refcount 1 */
6472
function imagerotate(GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false): GdImage|false {}
6573

6674
function imagesettile(GdImage $image, GdImage $tile): bool {}
6775

6876
function imagesetbrush(GdImage $image, GdImage $brush): bool {}
6977

78+
/** @refcount 1 */
7079
function imagecreate(int $width, int $height): GdImage|false {}
7180

7281
function imagetypes(): int {}
7382

83+
/** @refcount 1 */
7484
function imagecreatefromstring(string $data): GdImage|false {}
7585

7686
#ifdef HAVE_GD_AVIF
87+
/** @refcount 1 */
7788
function imagecreatefromavif(string $filename): GdImage|false {}
7889
#endif
7990

91+
/** @refcount 1 */
8092
function imagecreatefromgif(string $filename): GdImage|false {}
8193

8294
#ifdef HAVE_GD_JPG
95+
/** @refcount 1 */
8396
function imagecreatefromjpeg(string $filename): GdImage|false {}
8497
#endif
8598

8699
#ifdef HAVE_GD_PNG
100+
/** @refcount 1 */
87101
function imagecreatefrompng(string $filename): GdImage|false {}
88102
#endif
89103

90104
#ifdef HAVE_GD_WEBP
105+
/** @refcount 1 */
91106
function imagecreatefromwebp(string $filename): GdImage|false {}
92107
#endif
93108

109+
/** @refcount 1 */
94110
function imagecreatefromxbm(string $filename): GdImage|false {}
95111

96112
#ifdef HAVE_GD_XPM
113+
/** @refcount 1 */
97114
function imagecreatefromxpm(string $filename): GdImage|false {}
98115
#endif
99116

117+
/** @refcount 1 */
100118
function imagecreatefromwbmp(string $filename): GdImage|false {}
101119

120+
/** @refcount 1 */
102121
function imagecreatefromgd(string $filename): GdImage|false {}
103122

123+
/** @refcount 1 */
104124
function imagecreatefromgd2(string $filename): GdImage|false {}
105125

126+
/** @refcount 1 */
106127
function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, int $height): GdImage|false {}
107128

108129
#ifdef HAVE_GD_BMP
130+
/** @refcount 1 */
109131
function imagecreatefrombmp(string $filename): GdImage|false {}
110132
#endif
111133

@@ -168,8 +190,13 @@ function imagecolorresolve(GdImage $image, int $red, int $green, int $blue): int
168190

169191
function imagecolorexact(GdImage $image, int $red, int $green, int $blue): int {}
170192

193+
/** @return false|null */
171194
function imagecolorset(GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0): ?bool {}
172195

196+
/**
197+
* @return array<string, int>
198+
* @refcount 1
199+
*/
173200
function imagecolorsforindex(GdImage $image, int $color): array {}
174201

175202
function imagegammacorrect(GdImage $image, float $input_gamma, float $output_gamma): bool {}
@@ -230,17 +257,35 @@ function imagesy(GdImage $image): int {}
230257

231258
function imagesetclip(GdImage $image, int $x1, int $y1, int $x2, int $y2): bool {}
232259

260+
/**
261+
* @return array<int, int>
262+
* @refcount 1
263+
*/
233264
function imagegetclip(GdImage $image): array {}
234265

235266
#ifdef HAVE_GD_FREETYPE
267+
/**
268+
* @return array<int, int>|false
269+
* @refcount 1
270+
*/
236271
function imageftbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array|false {}
237272

273+
/**
274+
* @return array<int, int>|false
275+
* @refcount 1
276+
*/
238277
function imagefttext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {}
239278

240-
/** @alias imageftbbox */
279+
/**
280+
* @return array<int, int>|false
281+
* @alias imageftbbox
282+
*/
241283
function imagettfbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array|false {}
242284

243-
/** @alias imagefttext */
285+
/**
286+
* @return array<int, int>|false
287+
* @alias imagefttext
288+
*/
244289
function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {}
245290
#endif
246291

@@ -253,22 +298,37 @@ function imageflip(GdImage $image, int $mode): bool {}
253298

254299
function imageantialias(GdImage $image, bool $enable): bool {}
255300

301+
/** @refcount 1 */
256302
function imagecrop(GdImage $image, array $rectangle): GdImage|false {}
257303

304+
/** @refcount 1 */
258305
function imagecropauto(GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): GdImage|false {}
259306

307+
/** @refcount 1 */
260308
function imagescale(GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false {}
261309

310+
/** @refcount 1 */
262311
function imageaffine(GdImage $image, array $affine, ?array $clip = null): GdImage|false {}
263312

264-
/** @param array|float $options */
313+
/**
314+
* @param array|float $options
315+
* @refcount 1
316+
* @return array<int, float>|false
317+
*/
265318
function imageaffinematrixget(int $type, $options): array|false {}
266319

320+
/**
321+
* @return array<int, float>|false
322+
* @refcount 1
323+
*/
267324
function imageaffinematrixconcat(array $matrix1, array $matrix2): array|false {}
268325

269326
function imagegetinterpolation(GdImage $image): int {}
270327

271328
function imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool {}
272329

330+
/**
331+
* @return array<int, int>|true
332+
* @refcount 1
333+
*/
273334
function imageresolution(GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool {}
274-

ext/gd/gd_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: 301ffe25399211f04e4aa377152c9ca9ec81e1d0 */
2+
* Stub hash: 722e0701b4ded4747d71433c11b9575e41826be3 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gd_info, 0, 0, IS_ARRAY, 0)
55
ZEND_END_ARG_INFO()

0 commit comments

Comments
 (0)