@@ -247,7 +247,7 @@ public function set_charset(?string $charset);
247
247
*
248
248
* @return bool
249
249
*/
250
- public function options (?int $ option , ? mixed $ value );
250
+ public function options (?int $ option , $ value );
251
251
252
252
/**
253
253
* @param ?int $mysql_option
@@ -398,10 +398,6 @@ public function free_result();
398
398
399
399
class mysqli_stmt
400
400
{
401
- /**
402
- * @param mysqli $mysqli_link
403
- * @param string $statement
404
- */
405
401
public function __construct (mysqli $ mysqli_link , string $ statement );
406
402
407
403
/**
@@ -425,14 +421,14 @@ public function attr_set(int $attr, int $mode_in);
425
421
*
426
422
* @return bool
427
423
*/
428
- public function bind_param (string $ types , mixed &...$ vars );
424
+ public function bind_param (string $ types , &...$ vars );
429
425
430
426
/**
431
427
* @param mixed &...$vars
432
428
*
433
429
* @return bool
434
430
*/
435
- public function bind_result (mixed &...$ vars );
431
+ public function bind_result (&...$ vars );
436
432
437
433
/**
438
434
* @return bool
@@ -521,21 +517,31 @@ class mysqli_sql_exception extends RuntimeException
521
517
{
522
518
}
523
519
524
- function mysqli_affected_rows (mysqli $ mysql_link ): int {}
520
+ function mysqli_affected_rows (mysqli $ mysql_link ): int | bool {}
525
521
526
522
function mysqli_autocommit (mysqli $ mysql_link , bool $ mode ): bool {}
527
523
528
524
function mysqli_begin_transaction (mysqli $ mysql_link , int $ flags = 0 , string $ name = '' ): bool {}
529
525
530
526
function mysqli_change_user (mysqli $ mysql_link , string $ user , string $ password , ?string $ database ): bool {}
531
527
532
- function mysqli_character_set_name (mysqli $ mysql_link ): string {}
528
+ function mysqli_character_set_name (mysqli $ mysql_link ): string | bool {}
533
529
534
530
function mysqli_close (mysqli $ mysql_link ): bool {}
535
531
536
532
function mysqli_commit (mysqli $ mysql_link , int $ flags = 0 , string $ name = '' ): bool {}
537
533
538
- function mysqli_connect (?string $ host = null , ?string $ user = null , ?string $ password = null , ?string $ database = null , ?int $ port = null , ?string $ socket = null ): mysqli {}
534
+ /**
535
+ * @param ?string $host
536
+ * @param ?string $user
537
+ * @param ?string $password
538
+ * @param ?string $database
539
+ * @param ?int $port
540
+ * @param ?int $flags
541
+ *
542
+ * @return mysqli|bool
543
+ */
544
+ function mysqli_connect (?string $ host = null , ?string $ user = null , ?string $ password = null , ?string $ database = null , ?int $ port = null , ?string $ socket = null ) {}
539
545
540
546
function mysqli_connect_errno (): int {}
541
547
@@ -547,9 +553,9 @@ function mysqli_dump_debug_info(mysqli $mysql_link): bool {}
547
553
548
554
function mysqli_debug (string $ debug ): bool {}
549
555
550
- function mysqli_errno (mysqli $ mysql_link ): int {}
556
+ function mysqli_errno (mysqli $ mysql_link ): int | bool {}
551
557
552
- function mysqli_error (mysqli $ mysql_link ): string {}
558
+ function mysqli_error (mysqli $ mysql_link ): string | bool {}
553
559
554
560
function mysqli_error_list (mysqli $ mysql_link ): array {}
555
561
@@ -559,57 +565,57 @@ function mysqli_execute(mysqli_stmt $mysql_stmt): bool {}
559
565
560
566
function mysqli_fetch_field (mysqli_result $ mysql_result ): object |false {}
561
567
562
- function mysqli_fetch_fields (mysqli_result $ mysql_result ): array {}
568
+ function mysqli_fetch_fields (mysqli_result $ mysql_result ): array | bool {}
563
569
564
570
function mysqli_fetch_field_direct (mysqli_result $ mysql_result , int $ offset ): object |false {}
565
571
566
572
function mysqli_fetch_lengths (mysqli_result $ mysql_result ): array |false {}
567
573
568
574
function mysqli_fetch_all (mysqli_result $ mysql_result , int $ mode = MYSQLI_NUM ): array |false {}
569
575
570
- function mysqli_fetch_array (mysqli_result $ mysql_result , int $ fetchtype = MYSQLI_BOTH ): array |false {}
576
+ function mysqli_fetch_array (mysqli_result $ mysql_result , int $ fetchtype = MYSQLI_BOTH ): array |false | null {}
571
577
572
- function mysqli_fetch_assoc (mysqli_result $ mysql_result ): array {}
578
+ function mysqli_fetch_assoc (mysqli_result $ mysql_result ): array | bool | null {}
573
579
574
- function mysqli_fetch_object (mysqli_result $ mysqli_result , string $ class_name = 'stdClass ' , array $ params = []): object {}
580
+ function mysqli_fetch_object (mysqli_result $ mysqli_result , string $ class_name = 'stdClass ' , array $ params = []): object | bool | null {}
575
581
576
- function mysqli_fetch_row (mysqli_result $ mysqli_result ): array {}
582
+ function mysqli_fetch_row (mysqli_result $ mysqli_result ): array | bool | null {}
577
583
578
- function mysqli_field_count (mysqli_result $ mysqli_result ): int {}
584
+ function mysqli_field_count (mysqli $ mysqli_link ): int | bool {}
579
585
580
586
function mysqli_field_seek (mysqli_result $ mysqli_result , int $ field_nr ): bool {}
581
587
582
- function mysqli_field_tell (mysqli_result $ mysqli_result ): int {}
588
+ function mysqli_field_tell (mysqli_result $ mysqli_result ): int | bool {}
583
589
584
590
function mysqli_free_result (mysqli_result $ mysqli_result ): void {}
585
591
586
592
function mysqli_get_connection_stats (mysqli $ mysqli_link ): array {}
587
593
588
- function mysqli_get_client_stats (mysqli $ mysqli_link ): array {}
594
+ function mysqli_get_client_stats (): array {}
589
595
590
- function mysqli_get_charset (mysqli $ mysqli_link ): object {}
596
+ function mysqli_get_charset (mysqli $ mysqli_link ): object | bool {}
591
597
592
598
function mysqli_get_client_info (): string {}
593
599
594
600
function mysqli_get_client_version (): int {}
595
601
596
602
function mysqli_get_links_stats (mysqli $ mysqli_link ): array {}
597
603
598
- function mysqli_get_host_info (mysqli $ mysqli_link ): string {}
604
+ function mysqli_get_host_info (mysqli $ mysqli_link ): string | bool {}
599
605
600
- function mysqli_get_proto_info (mysqli $ mysqli_link ): int {}
606
+ function mysqli_get_proto_info (mysqli $ mysqli_link ): int | bool {}
601
607
602
- function mysqli_get_server_info (mysqli $ mysqli_link ): string {}
608
+ function mysqli_get_server_info (mysqli $ mysqli_link ): string | bool {}
603
609
604
- function mysqli_get_server_version (mysqli $ mysqli_link ): int {}
610
+ function mysqli_get_server_version (mysqli $ mysqli_link ): int | bool {}
605
611
606
612
function mysqli_get_warnings (mysqli $ mysqli_link ): mysqli_warning {}
607
613
608
614
function mysqli_init (): mysqli {}
609
615
610
- function mysqli_info (mysqli $ mysqli_link ): string {}
616
+ function mysqli_info (mysqli $ mysqli_link ): string | bool | null {}
611
617
612
- function mysqli_insert_id (mysqli $ mysqli_link ): int |string {}
618
+ function mysqli_insert_id (mysqli $ mysqli_link ): int |bool | string {}
613
619
614
620
function mysqli_kill (mysqli $ mysqli_link , int $ processid ): bool {}
615
621
@@ -619,15 +625,22 @@ function mysqli_multi_query(mysqli $mysqli_link, string $query): bool {}
619
625
620
626
function mysqli_next_result (mysqli $ mysqli_link ): bool {}
621
627
622
- function mysqli_num_fields (mysqli $ mysqli_link ): int {}
628
+ function mysqli_num_fields (mysqli_result $ mysql_result ): int | bool {}
623
629
624
- function mysqli_num_rows (mysqli $ mysqli_link ): int |string {}
630
+ function mysqli_num_rows (mysqli_result $ mysqli_result ): int |string | bool {}
625
631
626
- function mysqli_options (mysqli $ mysqli_link , int $ mysql_option , mixed $ mysql_value ): bool {}
632
+ /**
633
+ * @param mysqli $mysqli_link
634
+ * @param int $mysql_option
635
+ * @param mixed $mysql_value
636
+ *
637
+ * @return bool
638
+ */
639
+ function mysqli_options (mysqli $ mysqli_link , int $ mysql_option , $ mysql_value ): bool {}
627
640
628
641
function mysqli_ping (mysqli $ mysqli_link ): bool {}
629
642
630
- function mysqli_poll (?array &$ read , ?array &$ write , ?array &$ error , int $ sec , int $ usec = 0 ): int {}
643
+ function mysqli_poll (?array &$ read , ?array &$ write , ?array &$ error , int $ sec , int $ usec = 0 ): int | bool {}
631
644
632
645
/**
633
646
* @param mysqli $mysqli_link
@@ -648,9 +661,20 @@ function mysqli_report(int $flags): bool {}
648
661
*/
649
662
function mysqli_query (mysqli $ mysqli_link , string $ query , int $ resultmode = MYSQLI_STORE_RESULT ) {}
650
663
651
- function mysqli_real_connect (mysqli $ mysqli_link , ?string $ host = null , ?string $ user = null , ?string $ password = null , ?string $ database = null , ?int $ port = null , ?int $ flags = null ): mysqli {}
664
+ /**
665
+ * @param mysqli $mysqli_link
666
+ * @param ?string $host
667
+ * @param ?string $user
668
+ * @param ?string $password
669
+ * @param ?string $database
670
+ * @param ?int $port
671
+ * @param ?int $flags
672
+ *
673
+ * @return mysqli|bool
674
+ */
675
+ function mysqli_real_connect (mysqli $ mysqli_link , ?string $ host = null , ?string $ user = null , ?string $ password = null , ?string $ database = null , ?int $ port = null , ?int $ flags = null ) {}
652
676
653
- function mysqli_real_escape_string (mysqli $ mysqli_link , string $ escapestr ): string {}
677
+ function mysqli_real_escape_string (mysqli $ mysqli_link , string $ escapestr ): string | bool {}
654
678
655
679
function mysqli_real_query (mysqli $ mysqli_link , string $ query ): bool {}
656
680
@@ -671,15 +695,28 @@ function mysqli_select_db(mysqli $mysqli_link, string $dbname): bool {}
671
695
672
696
function mysqli_set_charset (mysqli $ mysqli_link , string $ cs_name ): bool {}
673
697
674
- function mysqli_stmt_affected_rows (mysqli_stmt $ mysql_stmt ): int {}
698
+ function mysqli_stmt_affected_rows (mysqli_stmt $ mysql_stmt ): int | bool {}
675
699
676
700
function mysqli_stmt_attr_get (mysqli_stmt $ mysql_stmt , int $ attr ): int |false {}
677
701
678
702
function mysqli_stmt_attr_set (mysqli_stmt $ mysql_stmt , int $ attr , int $ mode_in ): bool {}
679
703
680
- function mysqli_stmt_bind_param (mysqli_stmt $ mysql_stmt , string $ types , mixed &...$ vars ): bool {}
704
+ /**
705
+ * @param mysqli_stmt $mysql_stmt
706
+ * @param string $types
707
+ * @param mixed &...$vars
708
+ *
709
+ * @return bool
710
+ */
711
+ function mysqli_stmt_bind_param (mysqli_stmt $ mysql_stmt , string $ types , &...$ vars ): bool {}
681
712
682
- function mysqli_stmt_bind_result (mysqli_stmt $ mysql_stmt , mixed &...$ vars ): bool {}
713
+ /**
714
+ * @param mysqli_stmt $mysql_stmt
715
+ * @param mixed &...$vars
716
+ *
717
+ * @return bool
718
+ */
719
+ function mysqli_stmt_bind_result (mysqli_stmt $ mysql_stmt , &...$ vars ): bool {}
683
720
684
721
function mysqli_stmt_close (mysqli_stmt $ mysql_stmt ): bool {}
685
722
@@ -691,15 +728,15 @@ function mysqli_stmt_close(mysqli_stmt $mysql_stmt): bool {}
691
728
*/
692
729
function mysqli_stmt_data_seek (mysqli_stmt $ mysql_stmt , int $ offset ) {}
693
730
694
- function mysqli_stmt_errno (mysqli_stmt $ mysql_stmt ): int {}
731
+ function mysqli_stmt_errno (mysqli_stmt $ mysql_stmt ): int | bool {}
695
732
696
- function mysqli_stmt_error (mysqli_stmt $ mysql_stmt ): string {}
733
+ function mysqli_stmt_error (mysqli_stmt $ mysql_stmt ): string | bool {}
697
734
698
735
function mysqli_stmt_error_list (mysqli_stmt $ mysql_stmt ): array {}
699
736
700
- function mysqli_stmt_fetch (mysqli_stmt $ mysql_stmt ): bool {}
737
+ function mysqli_stmt_fetch (mysqli_stmt $ mysql_stmt ): bool | null {}
701
738
702
- function mysqli_stmt_field_count (mysqli_stmt $ mysql_stmt ): int {}
739
+ function mysqli_stmt_field_count (mysqli_stmt $ mysql_stmt ): int | bool {}
703
740
704
741
function mysqli_stmt_free_result (mysqli_stmt $ mysql_stmt ): void {}
705
742
@@ -710,7 +747,12 @@ function mysqli_stmt_free_result(mysqli_stmt $mysql_stmt): void {}
710
747
*/
711
748
function mysqli_stmt_get_result (mysqli_stmt $ mysql_stmt ) {}
712
749
713
- function mysqli_stmt_get_warnings (mysqli_stmt $ mysql_stmt ): mysqli_warning {}
750
+ /**
751
+ * @param mysqli_stmt $mysql_stmt
752
+ *
753
+ * @return mysqli_warning|bool
754
+ */
755
+ function mysqli_stmt_get_warnings (mysqli_stmt $ mysql_stmt ) {}
714
756
715
757
/**
716
758
* @param mysqli $mysql_link
@@ -719,15 +761,15 @@ function mysqli_stmt_get_warnings(mysqli_stmt $mysql_stmt): mysqli_warning {}
719
761
*/
720
762
function mysqli_stmt_init (mysqli $ mysql_link ) {}
721
763
722
- function mysqli_stmt_insert_id (mysqli_stmt $ mysql_stmt ): int {}
764
+ function mysqli_stmt_insert_id (mysqli_stmt $ mysql_stmt ): int | bool {}
723
765
724
766
function mysqli_stmt_more_results (mysqli_stmt $ mysql_stmt ): bool {}
725
767
726
768
function mysqli_stmt_next_result (mysqli_stmt $ mysql_stmt ): bool {}
727
769
728
- function mysqli_stmt_num_rows (mysqli_stmt $ mysql_stmt ): int {}
770
+ function mysqli_stmt_num_rows (mysqli_stmt $ mysql_stmt ): int | bool {}
729
771
730
- function mysqli_stmt_param_count (mysqli_stmt $ mysql_stmt ): int {}
772
+ function mysqli_stmt_param_count (mysqli_stmt $ mysql_stmt ): int | bool {}
731
773
732
774
function mysqli_stmt_prepare (mysqli_stmt $ mysql_stmt , string $ query ): bool {}
733
775
@@ -744,9 +786,9 @@ function mysqli_stmt_send_long_data(mysqli_stmt $mysql_stmt, int $param_nr, stri
744
786
745
787
function mysqli_stmt_store_result (mysqli_stmt $ mysql_stmt ): bool {}
746
788
747
- function mysqli_stmt_sqlstate (mysqli_stmt $ mysql_stmt ): string {}
789
+ function mysqli_stmt_sqlstate (mysqli_stmt $ mysql_stmt ): string | bool {}
748
790
749
- function mysqli_sqlstate (mysqli $ mysqli_link ): string {}
791
+ function mysqli_sqlstate (mysqli $ mysqli_link ): string | bool {}
750
792
751
793
function mysqli_ssl_set (mysqli $ mysql_link , string $ key , string $ cert , string $ certificate_authority , string $ certificate_authority_path , string $ cipher ): bool {}
752
794
@@ -760,7 +802,7 @@ function mysqli_stat(mysqli $mysql_link): string|false {}
760
802
*/
761
803
function mysqli_store_result (mysqli $ mysql_link , int $ flags = 0 ) {}
762
804
763
- function mysqli_thread_id (mysqli $ mysql_link ): int {}
805
+ function mysqli_thread_id (mysqli $ mysql_link ): int | bool {}
764
806
765
807
function mysqli_thread_safe (): bool {}
766
808
@@ -771,10 +813,17 @@ function mysqli_thread_safe(): bool {}
771
813
*/
772
814
function mysqli_use_result (mysqli $ mysql_link ) {}
773
815
774
- function mysqli_warning_count (mysqli $ mysql_link ): int {}
816
+ function mysqli_warning_count (mysqli $ mysql_link ): int | bool {}
775
817
776
818
function mysqli_refresh (mysqli $ mysqli_link , int $ options ): bool {}
777
819
778
820
function mysqli_escape_string (mysqli $ mysqli_link , string $ escapestr ): string {}
779
821
780
- function mysqli_set_opt (mysqli $ mysqli_link , int $ mysql_option , mixed $ mysql_value ): bool {}
822
+ /**
823
+ * @param mysqli $mysqli_link
824
+ * @param int $mysql_option
825
+ * @param mixed $mysql_value
826
+ *
827
+ * @return bool
828
+ */
829
+ function mysqli_set_opt (mysqli $ mysqli_link , int $ mysql_option , $ mysql_value ): bool {}
0 commit comments