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