Doc #81232 [Opn->Csd]: Wrong params names for mysqli::__construct()

From: Date: Fri, 09 Jul 2021 21:03:13 +0000
Subject: Doc #81232 [Opn->Csd]: Wrong params names for mysqli::__construct()
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18941@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81232&edit=1

 ID:                 81232
 Updated by:         dharman@php.net
 Reported by:        yo at drmad dot org
 Summary:            Wrong params names for mysqli::__construct()
-Status:             Open
+Status:             Closed
 Type:               Documentation Problem
 Package:            Documentation problem
 Operating System:   -
 PHP Version:        8.0.8
-Assigned To:        
+Assigned To:        dharman
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.




Previous Comments:
------------------------------------------------------------------------
[2021-07-09 01:12:06] lufei@php.net

The following pull request has been associated:

Patch Name: Fix wrong params names for mysqli::__construct() [81232]
On GitHub:  https://github.com/php/doc-en/pull/769
Patch:      https://github.com/php/doc-en/pull/769.patch

------------------------------------------------------------------------
[2021-07-08 00:35:16] yo at drmad dot org

Description:
------------
Now that PHP supports named parameters, those names in the documentation must match the used in the
PHP source. 

E.g. in the documentation for mysqli::__construct(), '$host' and '$dbname' are
wrong.

Expected result:
----------------
From file ext/mysqli/mysqli.stub.php in the source:

public function __construct(
    ?string $hostname = null,
    ?string $username = null,
    ?string $password = null,
    ?string $database = null,
    ?int $port = null,
    ?string $socket = null
)

Actual result:
--------------
From https://www.php.net/manual/en/mysqli.construct.php
:

public mysqli::__construct(
    string $host = ini_get("mysqli.default_host"),
    string $username = ini_get("mysqli.default_user"),
    string $passwd = ini_get("mysqli.default_pw"),
    string $dbname = "",
    int $port = ini_get("mysqli.default_port"),
    string $socket = ini_get("mysqli.default_socket")
)


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=81232&edit=1


Thread (5 messages)

« previous php.doc.bugs (#18941) next »