#44155 [Asn->Csd]: pdo_drivers() not documented

From: Date: Fri, 07 Nov 2008 11:59:34 +0000
Subject: #44155 [Asn->Csd]: pdo_drivers() not documented
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1433@lists.php.net to get a copy of this message
ID: 44155 Updated by: vrana@php.net Reported By: uwendel at mysql dot com -Status: Assigned +Status: Closed Bug Type: Documentation problem Operating System: Linux PHP Version: Irrelevant Assigned To: kalle 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. I've documented it as an alias of PDO::getAvailableDrivers(). Previous Comments: ------------------------------------------------------------------------ [2008-02-18 22:40:19] uw@php.net Well, yes, I know that PDO::getAvailableDrivers() is documented. But I wonder what to do with pdo_drivers(): document and test or ignore. Maybe a PDO hacker can hook in and comment. PS: would be nice if one could prioritize "bugs". This is definetly a low-priority feature request. ------------------------------------------------------------------------ [2008-02-18 19:08:50] philip@php.net It's documented, sort of, but this bug is still open: http://docs.php.net/manual/en/pdo.getavailabledrivers.php Looks like the function was added, removed in favour of method only, then added again. ------------------------------------------------------------------------ [2008-02-18 18:32:04] uwendel at mysql dot com Description: ------------ pdo_drivers() is not documented as it seems, http://de.php.net/manual-lookup.php?pattern=pdo_drivers&lang=en Please document or remove it. ext/pdo/pdo.c /* {{{ proto array pdo_drivers() Return array of available PDO drivers */ PHP_FUNCTION(pdo_drivers) { HashPosition pos; pdo_driver_t **pdriver; array_init(return_value); zend_hash_internal_pointer_reset_ex(&pdo_driver_hash, &pos); while (SUCCESS == zend_hash_get_current_data_ex(&pdo_driver_hash, (void**)&pdriver, &pos)) { add_next_index_stringl(return_value, (char*)(*pdriver)->driver_name, (*pdriver)->driver_name_len, 1); zend_hash_move_forward_ex(&pdo_driver_hash, &pos); } } /* }}} */ Reproduce code: --------------- nixnutz@ulflinux:~/php53> sapi/cli/php -r "var_dump(pdo_drivers());" array(3) { [0]=> string(7) "sqlite2" [1]=> string(6) "sqlite" [2]=> string(5) "mysql" } Expected result: ---------------- Well, result is fine. It should be documented that's all. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44155&edit=1

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