#49535 [Opn->Asn]: mysqli::get_client_info/get_client_version are properties

From: Date: Mon, 28 Sep 2009 12:48:58 +0000
Subject: #49535 [Opn->Asn]: mysqli::get_client_info/get_client_version are properties
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969380937@lists.php.net to get a copy of this message
Hi, While looking into the bug detailed below I wrote the following code: <?php $mysqli = new mysqli('localhost', 'root', NULL, 'world', NULL, '/tmp/mysql.sock'); if ($mysqli->connect_error) {
    die('Connect Error (' . $mysqli->connect_errno . ') '
            . $mysqli->connect_error);
} echo 'Success... ' . $mysqli->host_info . "\n"; printf("Client library version: %d\n", mysqli_get_client_version()); printf("Client library version: %d\n", $mysqli->get_client_version); printf("Client info: %s\n", mysqli_get_client_info()); printf("Client info: %s\n", $mysqli->get_client_info); $mysqli->close(); ?> The output is as follows: tony~ $ php phptest.php Success... Localhost via UNIX socket Client library version: 50067 Client library version: 0 Client info: 5.0.67 Client info: tony~ $ Obviously, something is not right (the properties don't seem to have the correct info), or I am doing something wrong (more likely!). Can anyone spot the problem? Thanks, Tony On 16 Sep 2009, at 09:57, abedford@php.net wrote:
ID:               49535
Updated by:       abedford@php.net
Reported By:      the_djmaze at hotmail dot com
-Status:           Open
+Status:           Assigned
Bug Type:         Documentation problem
Operating System: Linux
PHP Version:      Irrelevant
-Assigned To:
+Assigned To:      abedford
Previous Comments: ------------------------------------------------------------------------ [2009-09-11 19:27:36] the_djmaze at hotmail dot com Description: ------------ Documention is incorrect because they are properties. Reproduce code: --------------- According to: http://php.net/manual/en/mysqli.get-client-info.php This is: string mysqli::get_client_info ( void ) Should be: string mysqli->client_info According to: http://php.net/manual/en/mysqli.get-client-version.php This is: string mysqli::get_client_version ( void ) Should be: string mysqli->client_version Expected result: ---------------- method Actual result: -------------- property ------------------------------------------------------------------------ --Edit this bug report at http://bugs.php.net/?id=49535&edit=1 --PHP Documentation Bugs Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.doc (#969380937) next »