php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49535 mysqli::get_client_info/get_client_version are properties
Submitted: 2009-09-11 19:27 UTC Modified: 2009-09-30 08:56 UTC
From: the_djmaze at hotmail dot com Assigned: abedford (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
 [2009-09-11 19:27 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-28 14:14 UTC] svn@php.net
Automatic comment from SVN on behalf of abedford
Revision: http://svn.php.net/viewvc/?view=revision&revision=288902
Log: Fixed bug #49535. client_version and client_info are properties, not methods. Corrected summary table accordingly, as well as main entries.
 [2009-09-28 14:27 UTC] abedford@php.net
Now fixed in the XML sources. Thanks!
 [2009-09-28 16:13 UTC] rquadling@php.net
According to reflection, there are both methods AND properties related 
to getting the client info in the mysqli class, but only a property in 
relation to the client version.

The mysqli_driver class only has properties for client info and version.


 [2009-09-29 15:39 UTC] the_djmaze at hotmail dot com
So you mean they are static methods?

Then the documentation was partial correct, the properties were just missing.
 [2009-09-30 08:19 UTC] rquadling@php.net
According to php.exe --rc mysqli on PHP 5.3.2-dev (cli) (built: Sep 24 
2009 09:01:58), the methods are NOT static, but normal public 
functions.

Class [ <internal:mysqli> class mysqli ] {

  - Constants [0] {
  }

  - Static properties [0] {
  }

  - Static methods [0] {
  }

  - Properties [17] {
    Property [ <default> public $affected_rows ]
    Property [ <default> public $client_info ]
    Property [ <default> public $client_version ]
    Property [ <default> public $connect_errno ]
    Property [ <default> public $connect_error ]
    Property [ <default> public $errno ]
    Property [ <default> public $error ]
    Property [ <default> public $field_count ]
    Property [ <default> public $host_info ]
    Property [ <default> public $info ]
    Property [ <default> public $insert_id ]
    Property [ <default> public $server_info ]
    Property [ <default> public $server_version ]
    Property [ <default> public $sqlstate ]
    Property [ <default> public $protocol_version ]
    Property [ <default> public $thread_id ]
    Property [ <default> public $warning_count ]
  }

  - Methods [40] {
    Method [ <internal:mysqli> public method autocommit ] {
    }

    Method [ <internal:mysqli> public method change_user ] {
    }

    Method [ <internal:mysqli> public method character_set_name ] {
    }

    Method [ <internal:mysqli> public method client_encoding ] {
    }

    Method [ <internal:mysqli> public method close ] {
    }

    Method [ <internal:mysqli> public method commit ] {
    }

    Method [ <internal:mysqli> public method connect ] {
    }

    Method [ <internal:mysqli> public method dump_debug_info ] {
    }

    Method [ <internal:mysqli> public method debug ] {
    }

    Method [ <internal:mysqli> public method get_charset ] {
    }

    Method [ <internal:mysqli> public method get_client_info ] {
    }

    Method [ <internal:mysqli> public method get_connection_stats ] {
    }

    Method [ <internal:mysqli> public method get_server_info ] {
    }

    Method [ <internal:mysqli> public method get_warnings ] {
    }

    Method [ <internal:mysqli> public method init ] {
    }

    Method [ <internal:mysqli> public method kill ] {
    }

    Method [ <internal:mysqli> public method multi_query ] {
    }

    Method [ <internal:mysqli, ctor> public method mysqli ] {
    }

    Method [ <internal:mysqli> public method more_results ] {
    }

    Method [ <internal:mysqli> public method next_result ] {
    }

    Method [ <internal:mysqli> public method options ] {
    }

    Method [ <internal:mysqli> public method ping ] {
    }

    Method [ <internal:mysqli> public method prepare ] {
    }

    Method [ <internal:mysqli> public method query ] {
    }

    Method [ <internal:mysqli> public method real_connect ] {
    }

    Method [ <internal:mysqli> public method real_escape_string ] {
    }

    Method [ <internal:mysqli> public method poll ] {
    }

    Method [ <internal:mysqli> public method reap_async_query ] {
    }

    Method [ <internal:mysqli> public method escape_string ] {
    }

    Method [ <internal:mysqli> public method real_query ] {
    }

    Method [ <internal:mysqli> public method rollback ] {
    }

    Method [ <internal:mysqli> public method select_db ] {
    }

    Method [ <internal:mysqli> public method set_charset ] {
    }

    Method [ <internal:mysqli> public method set_opt ] {
    }

    Method [ <internal:mysqli> public method stat ] {
    }

    Method [ <internal:mysqli> public method stmt_init ] {
    }

    Method [ <internal:mysqli> public method store_result ] {
    }

    Method [ <internal:mysqli> public method thread_safe ] {
    }

    Method [ <internal:mysqli> public method use_result ] {
    }

    Method [ <internal:mysqli> public method refresh ] {
    }
  }
}


 [2009-09-30 08:56 UTC] abedford@php.net
Yes, you are right - it appears the mysqli->get_client_info() method is 
there - and what's more it works (according to my test code)! The 
question now I think is - should it be there, as the mysqli-
>get_client_version() method does not seem to be there. So

1) Should these only exist as properties?
2) Should the mysqli->get_client_info() method really be there?
3) If the answer to 2) is yes, what about mysqli->get_client_version() 
method - why is it missing?

I need some clarification on this - there is no point in documenting a 
method that shouldn't be there - on the other hand - if it should be 
there I need to document it and also the get_client_version method.
 [2009-09-30 12:27 UTC] svn@php.net
Automatic comment from SVN on behalf of abedford
Revision: http://svn.php.net/viewvc/?view=revision&revision=288990
Log: Further fixes for bug #49535. Included get_client_info method, which works, and moved client_info and client_version properties to their own files. Updated summary table accordingly.
 [2020-02-07 06:10 UTC] phpdocbot@php.net
Automatic comment on behalf of abedford
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=55f6c006caf846e2e4ca1d6e63a70319d887f231
Log: Fixed bug #49535. client_version and client_info are properties, not methods. Corrected summary table accordingly, as well as main entries.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 19 18:00:02 2025 UTC