php - How can I tell what version of mysqli is installed? -


i'm putting documentation developers , want include required php extensions , versions of each. instance, 1 requirement gd 2.1.1 , phalcon 2.0.1.

i know how figure out versions of php , mysql installed, can't figure out version of mysqli extension have. phpinfo shows following information under mysqli extension section:

mysqli support  enabled client api library version  5.5.43 active persistent links 0 inactive persistent links   0 active links    0 client api header version   5.5.41 mysqli_socket   /var/run/mysqld/mysqld.sock 

i think tells me version of mysql have installed 5.5.43, assume different version of mysqli.

dpkg shows version of php5-msyql 5.5.9+dfsg-1ubuntu4 (i think there's .9 that's truncated), believe version of metapackage , not version of extension:

$ dpkg -l php5-mysql desired=unknown/install/remove/purge/hold | status=not/inst/conf-files/unpacked/half-conf/half-inst/trig-await/trig-pend |/ err?=(none)/reinst-required (status,err: uppercase=bad) ||/ name                          version             architecture        description +++-=============================-===================-===================-================================================================ ii  php5-mysql                    5.5.9+dfsg-1ubuntu4 amd64               mysql module php5 

you can try below: http://php.net/manual/en/reflectionextension.getversion.php

$ext = new reflectionextension('mysqli'); var_dump($ext->getversion()); // output: string(3) "0.1" 

Comments