mysqli.stub.php 25 KB

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