xref: /PHP-8.1/ext/mysqli/mysqli.stub.php (revision 2b4fee03)
1<?php
2
3/** @generate-class-entries */
4
5final class mysqli_driver
6{
7    /** @readonly */
8    public string $client_info;
9
10    /** @readonly */
11    public int $client_version;
12
13    /** @readonly */
14    public int $driver_version;
15
16    public bool $reconnect = false;
17
18    public int $report_mode = 0;
19}
20
21class mysqli
22{
23    /**
24     * @readonly
25     * @link mysqli.affected-rows
26     */
27    public int|string $affected_rows;
28
29    /**
30     * @readonly
31     * @link mysqli.get-client-info
32     */
33    public string $client_info;
34
35    /**
36     * @readonly
37     * @link mysqli.get-client-version
38     */
39    public int $client_version;
40
41    /**
42     * @readonly
43     * @link mysqli.connect-errno
44     */
45    public int $connect_errno;
46
47    /**
48     * @readonly
49     * @link mysqli.connect-error
50     */
51    public ?string $connect_error;
52
53    /**
54     * @readonly
55     * @link mysqli.errno
56     */
57    public int $errno;
58
59    /**
60     * @readonly
61     * @link mysqli.error
62     */
63    public string $error;
64
65    /**
66     * @readonly
67     * @link mysqli.error-list
68     */
69    public array $error_list;
70
71    /**
72     * @readonly
73     * @link mysqli.field-count
74     */
75    public int $field_count;
76
77    /**
78     * @readonly
79     * @link mysqli.get-host-info
80     */
81    public string $host_info;
82
83    /**
84     * @readonly
85     * @link mysqli.info
86     */
87    public ?string $info;
88
89    /**
90     * @readonly
91     * @link mysqli.insert-id
92     */
93    public int|string $insert_id;
94
95    /**
96     * @readonly
97     * @link mysqli.get-server-info
98     */
99    public string $server_info;
100
101    /**
102     * @readonly
103     * @link mysqli.get-server-version
104     */
105    public int $server_version;
106
107    /**
108     * @readonly
109     * @link mysqli.sqlstate
110     */
111    public string $sqlstate;
112
113    /**
114     * @readonly
115     * @link mysqli.get-proto-info
116     */
117    public int $protocol_version;
118
119    /**
120     * @readonly
121     * @link mysqli.thread-id
122     */
123    public int $thread_id;
124
125    /**
126     * @readonly
127     * @link mysqli.warning-count
128     */
129    public int $warning_count;
130
131    public function __construct(
132        ?string $hostname = null,
133        ?string $username = null,
134        ?string $password = null,
135        ?string $database = null,
136        ?int $port = null,
137        ?string $socket = null
138    ) {}
139
140    /**
141     * @tentative-return-type
142     * @alias mysqli_autocommit
143     */
144    public function autocommit(bool $enable): bool {}
145
146    /**
147     * @tentative-return-type
148     * @alias mysqli_begin_transaction
149     */
150    public function begin_transaction(int $flags = 0, ?string $name = null): bool {}
151
152    /**
153     * @tentative-return-type
154     * @alias mysqli_change_user
155     */
156    public function change_user(string $username, string $password, ?string $database): bool {}
157
158    /**
159     * @tentative-return-type
160     * @alias mysqli_character_set_name
161     */
162    public function character_set_name(): string {}
163
164    /**
165     * @return true
166     * @alias mysqli_close
167     * @no-verify
168     */
169    public function close() {} // TODO make return type void
170
171    /**
172     * @tentative-return-type
173     * @alias mysqli_commit
174     */
175    public function commit(int $flags = 0, ?string $name = null): bool {}
176
177    /**
178     * @tentative-return-type
179     * @alias mysqli_connect
180     * @no-verify
181     */
182    public function connect(
183        ?string $hostname = null,
184        ?string $username = null,
185        ?string $password = null,
186        ?string $database = null,
187        ?int $port = null,
188        ?string $socket = null
189    ): bool {}
190
191    /**
192     * @tentative-return-type
193     * @alias mysqli_dump_debug_info
194     */
195    public function dump_debug_info(): bool {}
196
197    /**
198     * @return true
199     * @alias mysqli_debug
200     * @no-verify Should really be a static method
201     */
202    public function debug(string $options) {} // TODO make return type void
203
204    /**
205     * @tentative-return-type
206     * @alias mysqli_get_charset
207     */
208    public function get_charset(): ?object {}
209
210    /**
211     * @tentative-return-type
212     * @alias mysqli_get_client_info
213     * @deprecated 8.1.0
214     */
215    public function get_client_info(): string {}
216
217#if defined(MYSQLI_USE_MYSQLND)
218    /**
219     * @return array<string, mixed>
220     * @tentative-return-type
221     * @alias mysqli_get_connection_stats
222     */
223    public function get_connection_stats(): array {}
224#endif
225
226    /**
227     * @tentative-return-type
228     * @alias mysqli_get_server_info
229     */
230    public function get_server_info(): string {}
231
232    /**
233     * @tentative-return-type
234     * @alias mysqli_get_warnings
235     */
236    public function get_warnings(): mysqli_warning|false {}
237
238    /**
239     * @deprecated
240     * @return bool|null
241     * */
242    public function init() {}
243
244    /**
245     * @tentative-return-type
246     * @alias mysqli_kill
247     */
248    public function kill(int $process_id): bool {}
249
250    /**
251     * @tentative-return-type
252     * @alias mysqli_multi_query
253     */
254    public function multi_query(string $query): bool {}
255
256    /**
257     * @tentative-return-type
258     * @alias mysqli_more_results
259     */
260    public function more_results(): bool {}
261
262    /**
263     * @tentative-return-type
264     * @alias mysqli_next_result
265     */
266    public function next_result(): bool {}
267
268    /**
269     * @tentative-return-type
270     * @alias mysqli_ping
271     */
272    public function ping(): bool {}
273
274#if defined(MYSQLI_USE_MYSQLND)
275    /**
276     * @tentative-return-type
277     * @alias mysqli_poll
278     */
279    public static function poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0): int|false {}
280#endif
281
282    /**
283     * @tentative-return-type
284     * @alias mysqli_prepare
285     */
286    public function prepare(string $query): mysqli_stmt|false {}
287
288    /**
289     * @tentative-return-type
290     * @alias mysqli_query
291     */
292    public function query(string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool {}
293
294    /**
295     * @tentative-return-type
296     * @alias mysqli_real_connect
297     */
298    public function real_connect(
299        ?string $hostname = null,
300        ?string $username = null,
301        ?string $password = null,
302        ?string $database = null,
303        ?int $port = null,
304        ?string $socket = null,
305        int $flags = 0
306    ): bool {}
307
308    /**
309     * @tentative-return-type
310     * @alias mysqli_real_escape_string
311     */
312    public function real_escape_string(string $string): string {}
313
314#if defined(MYSQLI_USE_MYSQLND)
315    /**
316     * @tentative-return-type
317     * @alias mysqli_reap_async_query
318     */
319    public function reap_async_query(): mysqli_result|bool {}
320#endif
321
322    /**
323     * @tentative-return-type
324     * @alias mysqli_real_escape_string
325     */
326    public function escape_string(string $string): string {}
327
328    /**
329     * @tentative-return-type
330     * @alias mysqli_real_query
331     */
332    public function real_query(string $query): bool {}
333
334    /**
335     * @tentative-return-type
336     * @alias mysqli_release_savepoint
337     */
338    public function release_savepoint(string $name): bool {}
339
340    /**
341     * @tentative-return-type
342     * @alias mysqli_rollback
343     */
344    public function rollback(int $flags = 0, ?string $name = null): bool {}
345
346    /**
347     * @tentative-return-type
348     * @alias mysqli_savepoint
349     */
350    public function savepoint(string $name): bool {}
351
352    /**
353     * @tentative-return-type
354     * @alias mysqli_select_db
355     */
356    public function select_db(string $database): bool {}
357
358    /**
359     * @tentative-return-type
360     * @alias mysqli_set_charset
361     */
362    public function set_charset(string $charset): bool {}
363
364    /**
365     * @param string|int $value
366     * @tentative-return-type
367     * @alias mysqli_options
368     */
369    public function options(int $option, $value): bool {}
370
371    /**
372     * @param string|int $value
373     * @tentative-return-type
374     * @alias mysqli_options
375     */
376    public function set_opt(int $option, $value): bool {}
377
378    /**
379     * @return true
380     * @alias mysqli_ssl_set
381     * @no-verify
382     */
383    public function ssl_set(
384        ?string $key,
385        ?string $certificate,
386        ?string $ca_certificate,
387        ?string $ca_path,
388        ?string $cipher_algos
389    ) {} // TODO make return type void
390
391    /**
392     * @tentative-return-type
393     * @alias mysqli_stat
394     */
395    public function stat(): string|false {}
396
397    /**
398     * @tentative-return-type
399     * @alias mysqli_stmt_init
400     */
401    public function stmt_init(): mysqli_stmt|false {}
402
403    /**
404     * @tentative-return-type
405     * @alias mysqli_store_result
406     */
407    public function store_result(int $mode = 0): mysqli_result|false {}
408
409    /**
410     * @tentative-return-type
411     * @alias mysqli_thread_safe
412     */
413    public function thread_safe(): bool {}
414
415    /**
416     * @tentative-return-type
417     * @alias mysqli_use_result
418     */
419    public function use_result(): mysqli_result|false {}
420
421    /**
422     * @tentative-return-type
423     * @alias mysqli_refresh
424     */
425    public function refresh(int $flags): bool {}
426}
427
428class mysqli_result implements IteratorAggregate
429{
430    /**
431     * @readonly
432     * @link mysqli-result.current-field
433     */
434    public int $current_field;
435
436    /**
437     * @readonly
438     * @link mysqli-result.field-count
439     */
440    public int $field_count;
441
442    /**
443     * @readonly
444     * @link mysqli-result.lengths
445     */
446    public ?array $lengths;
447
448    /**
449     * @readonly
450     * @link mysqli-result.num-rows
451     */
452    public int|string $num_rows;
453
454    public int $type;
455
456    public function __construct(mysqli $mysql, int $result_mode = MYSQLI_STORE_RESULT) {}
457
458    /**
459     * @tentative-return-type
460     * @alias mysqli_free_result
461     */
462    public function close(): void {}
463
464    /**
465     * @tentative-return-type
466     * @alias mysqli_free_result
467     */
468    public function free(): void {}
469
470    /**
471     * @tentative-return-type
472     * @alias mysqli_data_seek
473     */
474    public function data_seek(int $offset): bool {}
475
476    /**
477     * @tentative-return-type
478     * @alias mysqli_fetch_field
479     */
480    public function fetch_field(): object|false {}
481
482    /**
483     * @return array<int, object>
484     * @tentative-return-type
485     * @alias mysqli_fetch_fields
486     */
487    public function fetch_fields(): array {}
488
489    /**
490     * @tentative-return-type
491     * @alias mysqli_fetch_field_direct
492     */
493    public function fetch_field_direct(int $index): object|false {}
494
495    /**
496     * @return array<int|string, mixed>
497     * @tentative-return-type
498     * @alias mysqli_fetch_all
499     */
500    public function fetch_all(int $mode = MYSQLI_NUM): array {}
501
502    /**
503     * @return array<int|string, mixed>|null|false
504     * @tentative-return-type
505     * @alias mysqli_fetch_array
506     */
507    public function fetch_array(int $mode = MYSQLI_BOTH): array|null|false {}
508
509    /**
510     * @return array<int|string, mixed>|null|false
511     * @tentative-return-type
512     * @alias mysqli_fetch_assoc
513     */
514    public function fetch_assoc(): array|null|false {}
515
516    /**
517     * @tentative-return-type
518     * @alias mysqli_fetch_object
519     */
520    public function fetch_object(string $class = "stdClass", array $constructor_args = []): object|null|false {}
521
522    /**
523     * @return array<int, mixed>|null|false
524     * @tentative-return-type
525     * @alias mysqli_fetch_row
526     */
527    public function fetch_row(): array|null|false {}
528
529    /** @alias mysqli_fetch_column */
530    public function fetch_column(int $column = 0): null|int|float|string|false {}
531
532    /**
533     * @tentative-return-type
534     * @alias mysqli_field_seek
535     */
536    public function field_seek(int $index): bool {}
537
538    /**
539     * @tentative-return-type
540     * @alias mysqli_free_result
541     */
542    public function free_result(): void {}
543
544    public function getIterator(): Iterator {}
545}
546
547class mysqli_stmt
548{
549    /**
550     * @readonly
551     * @link mysqli-stmt.affected-rows
552     */
553    public int|string $affected_rows;
554
555    /**
556     * @readonly
557     * @link mysqli-stmt.insert-id
558     */
559    public int|string $insert_id;
560
561    /**
562     * @readonly
563     * @link mysqli-stmt.num-rows
564     */
565    public int|string $num_rows;
566
567    /**
568     * @readonly
569     * @link mysqli-stmt.param-count
570     */
571    public int $param_count;
572
573    /**
574     * @readonly
575     * @link mysqli-stmt.field-count
576     */
577    public int $field_count;
578
579    /**
580     * @readonly
581     * @link mysqli-stmt.errno
582     */
583    public int $errno;
584
585    /**
586     * @readonly
587     * @link mysqli-stmt.error
588     */
589    public string $error;
590
591    /**
592     * @readonly
593     * @link mysqli-stmt.error-list
594     */
595    public array $error_list;
596
597    /**
598     * @readonly
599     * @link mysqli-stmt.sqlstate
600     */
601    public string $sqlstate;
602
603    public int $id;
604
605    public function __construct(mysqli $mysql, ?string $query = null) {}
606
607    /**
608     * @tentative-return-type
609     * @alias mysqli_stmt_attr_get
610     */
611    public function attr_get(int $attribute): int {}
612
613    /**
614     * @tentative-return-type
615     * @alias mysqli_stmt_attr_set
616     */
617    public function attr_set(int $attribute, int $value): bool {}
618
619    /**
620     * @tentative-return-type
621     * @alias mysqli_stmt_bind_param
622     */
623    public function bind_param(string $types, mixed &...$vars): bool {}
624
625    /**
626     * @tentative-return-type
627     * @alias mysqli_stmt_bind_result
628     */
629    public function bind_result(mixed &...$vars): bool {}
630
631    /**
632     * @return true
633     * @alias mysqli_stmt_close
634     * @no-verify
635     */
636    public function close() {} // TODO make return type void
637
638    /**
639     * @tentative-return-type
640     * @alias mysqli_stmt_data_seek
641     */
642    public function data_seek(int $offset): void {}
643
644    /**
645     * @tentative-return-type
646     * @alias mysqli_stmt_execute
647     */
648    public function execute(?array $params = null): bool {}
649
650    /**
651     * @tentative-return-type
652     * @alias mysqli_stmt_fetch
653     */
654    public function fetch(): ?bool {}
655
656    /**
657     * @tentative-return-type
658     * @alias mysqli_stmt_get_warnings
659     */
660    public function get_warnings(): mysqli_warning|false {}
661
662    /**
663     * @tentative-return-type
664     * @alias mysqli_stmt_result_metadata
665     */
666    public function result_metadata(): mysqli_result|false {}
667
668#if defined(MYSQLI_USE_MYSQLND)
669    /**
670     * @tentative-return-type
671     * @alias mysqli_stmt_more_results
672     */
673    public function more_results(): bool {}
674#endif
675
676    /**
677     * @tentative-return-type
678     * @alias mysqli_stmt_next_result
679     */
680    public function next_result(): bool {}
681
682    /**
683     * @tentative-return-type
684     * @alias mysqli_stmt_num_rows
685     */
686    public function num_rows(): int|string {}
687
688    /**
689     * @tentative-return-type
690     * @alias mysqli_stmt_send_long_data
691     */
692    public function send_long_data(int $param_num, string $data): bool {}
693
694    /**
695     * @tentative-return-type
696     * @alias mysqli_stmt_free_result
697     */
698    public function free_result(): void {}
699
700    /**
701     * @tentative-return-type
702     * @alias mysqli_stmt_reset
703     */
704    public function reset(): bool {}
705
706    /**
707     * @tentative-return-type
708     * @alias mysqli_stmt_prepare
709     */
710    public function prepare(string $query): bool {}
711
712    /**
713     * @tentative-return-type
714     * @alias mysqli_stmt_store_result
715     */
716    public function store_result(): bool {}
717
718#if defined(MYSQLI_USE_MYSQLND)
719    /**
720     * @tentative-return-type
721     * @alias mysqli_stmt_get_result
722     */
723    public function get_result(): mysqli_result|false {}
724#endif
725}
726
727final class mysqli_warning
728{
729    public string $message;
730
731    public string $sqlstate;
732
733    public int $errno;
734
735    private function __construct() {}
736
737    public function next(): bool {}
738}
739
740final class mysqli_sql_exception extends RuntimeException
741{
742    protected string $sqlstate = "00000";
743
744    public function getSqlState(): string {}
745}
746
747/** @refcount 1 */
748function mysqli_affected_rows(mysqli $mysql): int|string {}
749
750function mysqli_autocommit(mysqli $mysql, bool $enable): bool {}
751
752function mysqli_begin_transaction(mysqli $mysql, int $flags = 0, ?string $name = null): bool {}
753
754function mysqli_change_user(mysqli $mysql, string $username, string $password, ?string $database): bool {}
755
756/** @refcount 1 */
757function mysqli_character_set_name(mysqli $mysql): string {}
758
759/** @return true */
760function mysqli_close(mysqli $mysql): bool {} // TODO make return type void
761
762function mysqli_commit(mysqli $mysql, int $flags = 0, ?string $name = null): bool {}
763
764/** @refcount 1 */
765function mysqli_connect(
766    ?string $hostname = null,
767    ?string $username = null,
768    ?string $password = null,
769    ?string $database = null,
770    ?int $port = null,
771    ?string $socket = null
772): mysqli|false {}
773
774function mysqli_connect_errno(): int {}
775
776/** @refcount 1 */
777function mysqli_connect_error(): ?string {}
778
779function mysqli_data_seek(mysqli_result $result, int $offset): bool {}
780
781function mysqli_dump_debug_info(mysqli $mysql): bool {}
782
783/** @return true */
784function mysqli_debug(string $options): bool {} // TODO make return type void
785
786function mysqli_errno(mysqli $mysql): int {}
787
788/** @refcount 1 */
789function mysqli_error(mysqli $mysql): string {}
790
791/**
792 * @return array<int, array>
793 * @refcount 1
794 */
795function mysqli_error_list(mysqli $mysql): array {}
796
797function mysqli_stmt_execute(mysqli_stmt $statement, ?array $params = null): bool {}
798
799/** @alias mysqli_stmt_execute */
800function mysqli_execute(mysqli_stmt $statement, ?array $params = null): bool {}
801
802/** @refcount 1 */
803function mysqli_fetch_field(mysqli_result $result): object|false {}
804
805/**
806 * @return array<int, object>
807 * @refcount 1
808 */
809function mysqli_fetch_fields(mysqli_result $result): array {}
810
811/** @refcount 1 */
812function mysqli_fetch_field_direct(mysqli_result $result, int $index): object|false {}
813
814/**
815 * @return array<int, int>|false
816 * @refcount 1
817 */
818function mysqli_fetch_lengths(mysqli_result $result): array|false {}
819
820/**
821 * @return array<int|string, mixed>
822 * @refcount 1
823 */
824function mysqli_fetch_all(mysqli_result $result, int $mode = MYSQLI_NUM): array {}
825
826/**
827 * @return array<int|string, mixed>|null|false
828 * @refcount 1
829 */
830function mysqli_fetch_array(mysqli_result $result, int $mode = MYSQLI_BOTH): array|null|false {}
831
832/**
833 * @return array<int|string, mixed>|null|false
834 * @refcount 1
835 */
836function mysqli_fetch_assoc(mysqli_result $result): array|null|false {}
837
838/** @refcount 1 */
839function mysqli_fetch_object(mysqli_result $result, string $class = "stdClass", array $constructor_args = []): object|null|false {}
840
841/**
842 * @return array<int, mixed>|null|false
843 * @refcount 1
844 */
845function mysqli_fetch_row(mysqli_result $result): array|null|false {}
846
847function mysqli_fetch_column(mysqli_result $result, int $column = 0): null|int|float|string|false {}
848
849function mysqli_field_count(mysqli $mysql): int {}
850
851function mysqli_field_seek(mysqli_result $result, int $index): bool {}
852
853function mysqli_field_tell(mysqli_result $result): int {}
854
855function mysqli_free_result(mysqli_result $result): void {}
856
857#if defined(MYSQLI_USE_MYSQLND)
858/**
859 * @return array<string, mixed>
860 * @refcount 1
861 */
862function mysqli_get_connection_stats(mysqli $mysql): array {}
863
864/**
865 * @return array<string, string>
866 * @refcount 1
867 */
868function mysqli_get_client_stats(): array {}
869#endif
870
871/** @refcount 1 */
872function mysqli_get_charset(mysqli $mysql): ?object {}
873
874/** @refcount 1 */
875function mysqli_get_client_info(?mysqli $mysql = null): string {}
876
877function mysqli_get_client_version(): int {}
878
879/**
880 * @return array<string, int>
881 * @refcount 1
882 */
883function mysqli_get_links_stats(): array {}
884
885/** @refcount 1 */
886function mysqli_get_host_info(mysqli $mysql): string {}
887
888function mysqli_get_proto_info(mysqli $mysql): int {}
889
890/** @refcount 1 */
891function mysqli_get_server_info(mysqli $mysql): string {}
892
893function mysqli_get_server_version(mysqli $mysql): int {}
894
895/** @refcount 1 */
896function mysqli_get_warnings(mysqli $mysql): mysqli_warning|false {}
897
898/** @refcount 1 */
899function mysqli_init(): mysqli|false {}
900
901/** @refcount 1 */
902function mysqli_info(mysqli $mysql): ?string {}
903
904/** @refcount 1 */
905function mysqli_insert_id(mysqli $mysql): int|string {}
906
907function mysqli_kill(mysqli $mysql, int $process_id): bool {}
908
909function mysqli_more_results(mysqli $mysql): bool {}
910
911function mysqli_multi_query(mysqli $mysql, string $query): bool {}
912
913function mysqli_next_result(mysqli $mysql): bool {}
914
915function mysqli_num_fields(mysqli_result $result): int {}
916
917/** @refcount 1 */
918function mysqli_num_rows(mysqli_result $result): int|string {}
919
920/** @param string|int $value */
921function mysqli_options(mysqli $mysql, int $option, $value): bool {}
922
923/**
924 * @param string|int $value
925 * @alias mysqli_options
926 */
927function mysqli_set_opt(mysqli $mysql, int $option, $value): bool {}
928
929function mysqli_ping(mysqli $mysql): bool {}
930
931#if defined(MYSQLI_USE_MYSQLND)
932function mysqli_poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0): int|false {}
933#endif
934
935/** @refcount 1 */
936function mysqli_prepare(mysqli $mysql, string $query): mysqli_stmt|false {}
937
938function mysqli_report(int $flags): bool {}
939
940/** @refcount 1 */
941function mysqli_query(mysqli $mysql, string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool {}
942
943function mysqli_real_connect(
944    mysqli $mysql,
945    ?string $hostname = null,
946    ?string $username = null,
947    ?string $password = null,
948    ?string $database = null,
949    ?int $port = null,
950    ?string $socket = null,
951    int $flags = 0
952): bool {}
953
954/** @refcount 1 */
955function mysqli_real_escape_string(mysqli $mysql, string $string): string {}
956
957/** @alias mysqli_real_escape_string */
958function mysqli_escape_string(mysqli $mysql, string $string): string {}
959
960function mysqli_real_query(mysqli $mysql, string $query): bool {}
961
962#if defined(MYSQLI_USE_MYSQLND)
963/** @refcount 1 */
964function mysqli_reap_async_query(mysqli $mysql): mysqli_result|bool {}
965#endif
966
967function mysqli_release_savepoint(mysqli $mysql, string $name): bool {}
968
969function mysqli_rollback(mysqli $mysql, int $flags = 0, ?string $name = null): bool {}
970
971function mysqli_savepoint(mysqli $mysql, string $name): bool {}
972
973function mysqli_select_db(mysqli $mysql, string $database): bool {}
974
975function mysqli_set_charset(mysqli $mysql, string $charset): bool {}
976
977/** @refcount 1 */
978function mysqli_stmt_affected_rows(mysqli_stmt $statement): int|string {}
979
980function mysqli_stmt_attr_get(mysqli_stmt $statement, int $attribute): int {}
981
982function mysqli_stmt_attr_set(mysqli_stmt $statement, int $attribute, int $value): bool {}
983
984function mysqli_stmt_bind_param(mysqli_stmt $statement, string $types, mixed &...$vars): bool {}
985
986function mysqli_stmt_bind_result(mysqli_stmt $statement, mixed &...$vars): bool {}
987
988/** @return true */
989function mysqli_stmt_close(mysqli_stmt $statement): bool {}
990
991function mysqli_stmt_data_seek(mysqli_stmt $statement, int $offset): void {}
992
993function mysqli_stmt_errno(mysqli_stmt $statement): int {}
994
995/** @refcount 1 */
996function mysqli_stmt_error(mysqli_stmt $statement): string {}
997
998/**
999 * @return array<int, array>
1000 * @refcount 1
1001 */
1002function mysqli_stmt_error_list(mysqli_stmt $statement): array {}
1003
1004function mysqli_stmt_fetch(mysqli_stmt $statement): ?bool {}
1005
1006function mysqli_stmt_field_count(mysqli_stmt $statement): int {}
1007
1008function mysqli_stmt_free_result(mysqli_stmt $statement): void {}
1009
1010#if defined(MYSQLI_USE_MYSQLND)
1011/** @refcount 1 */
1012function mysqli_stmt_get_result(mysqli_stmt $statement): mysqli_result|false {}
1013#endif
1014
1015/** @refcount 1 */
1016function mysqli_stmt_get_warnings(mysqli_stmt $statement): mysqli_warning|false {}
1017
1018/** @refcount 1 */
1019function mysqli_stmt_init(mysqli $mysql): mysqli_stmt|false {}
1020
1021/** @refcount 1 */
1022function mysqli_stmt_insert_id(mysqli_stmt $statement): int|string {}
1023
1024#if defined(MYSQLI_USE_MYSQLND)
1025function mysqli_stmt_more_results(mysqli_stmt $statement): bool {}
1026#endif
1027
1028function mysqli_stmt_next_result(mysqli_stmt $statement): bool {}
1029
1030/** @refcount 1 */
1031function mysqli_stmt_num_rows(mysqli_stmt $statement): int|string {}
1032
1033function mysqli_stmt_param_count(mysqli_stmt $statement): int {}
1034
1035function mysqli_stmt_prepare(mysqli_stmt $statement, string $query): bool {}
1036
1037function mysqli_stmt_reset(mysqli_stmt $statement): bool {}
1038
1039/** @refcount 1 */
1040function mysqli_stmt_result_metadata(mysqli_stmt $statement): mysqli_result|false {}
1041
1042function mysqli_stmt_send_long_data(mysqli_stmt $statement, int $param_num, string $data): bool {}
1043
1044function mysqli_stmt_store_result(mysqli_stmt $statement): bool {}
1045
1046/** @refcount 1 */
1047function mysqli_stmt_sqlstate(mysqli_stmt $statement): string {}
1048
1049/** @refcount 1 */
1050function mysqli_sqlstate(mysqli $mysql): string {}
1051
1052/** @return true */
1053function mysqli_ssl_set(
1054    mysqli $mysql,
1055    ?string $key,
1056    ?string $certificate,
1057    ?string $ca_certificate,
1058    ?string $ca_path,
1059    ?string $cipher_algos
1060): bool {} // TODO make return type void
1061
1062/** @refcount 1 */
1063function mysqli_stat(mysqli $mysql): string|false {}
1064
1065/** @refcount 1 */
1066function mysqli_store_result(mysqli $mysql, int $mode = 0): mysqli_result|false {}
1067
1068function mysqli_thread_id(mysqli $mysql): int {}
1069
1070function mysqli_thread_safe(): bool {}
1071
1072/** @refcount 1 */
1073function mysqli_use_result(mysqli $mysql): mysqli_result|false {}
1074
1075function mysqli_warning_count(mysqli $mysql): int {}
1076
1077function mysqli_refresh(mysqli $mysql, int $flags): bool {}
1078