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

From: Date: Mon, 28 Sep 2009 14:03:25 +0000
Subject: Re: #49535 [Opn->Asn]: mysqli::get_client_info/get_client_version are properties
References: 1 2 3 4  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969380940@lists.php.net to get a copy of this message
2009/9/28 Anthony Bedford <Anthony.Bedford@sun.com>: > > On 28 Sep 2009, at 14:21, Kalle Sommer Nielsen wrote: > >> Hi Anthony >> >> 2009/9/28 Anthony Bedford <Anthony.Bedford@sun.com>: >>> >>> 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? >> >> Thats because the properties is called 'client_info' and >> 'client_version', not prefixed with get as its procedural equal: >> > > That explains it! > > Many thanks, > Tony > > >> C:\php\six\Release_TS>php -r "$mysqli = new mysqli('localhost', >> 'root', ''); var_dump($mysqli->client_info, >> $mysqli->client_version);" >> unicode(48) "mysqlnd 5.0.5-dev - 081106 - $Revision: 288379 $" >> int(50005) >> >> -- >> regrads, >> >> Kalle Sommer Nielsen >> kalle@php.net > > According to reflection (edited) - Functions { Function [ <internal:mysqli> function mysqli_get_client_info ] { } Function [ <internal:mysqli> function mysqli_get_client_version ] { } } - Classes [6] { Class [ <internal:mysqli> final class mysqli_driver ] { - Properties [6] { Property [ <default> public $client_info ] Property [ <default> public $client_version ] } } Class [ <internal:mysqli> class mysqli ] { - Properties [17] { Property [ <default> public $client_info ] Property [ <default> public $client_version ] } - Methods [40] { Method [ <internal:mysqli> public method get_client_info ] { } } } } } The mysqli::get_client_info() method looks like the odd one out. I would guess from the lack of results for this method that it shouldn't be there. If it worked, then I'd expect the mysqli::get_client_version() method to also be present. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling

« previous php.doc (#969380940) next »