<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>List all the handlers available</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.dba-firstkey.html">dba_firstkey</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.dba-insert.html">dba_insert</a></div> <div class="up"><a href="ref.dba.html">DBA Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.dba-handlers" class="refentry"> <div class="refnamediv"> <h1 class="refname">dba_handlers</h1> <p class="verinfo">(PHP 4 >= 4.3.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">dba_handlers</span> — <span class="dc-title">List all the handlers available</span></p> </div> <div class="refsect1 description" id="refsect1-function.dba-handlers-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><strong>dba_handlers</strong></span> ([ <span class="methodparam"><span class="type">bool</span> <code class="parameter">$full_info</code><span class="initializer"> = <strong><code>FALSE</code></strong></span></span> ] )</div> <p class="para rdfs-comment"> <span class="function"><strong>dba_handlers()</strong></span> list all the handlers supported by this extension. </p> </div> <div class="refsect1 parameters" id="refsect1-function.dba-handlers-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <code class="parameter">full_info</code></dt> <dd> <p class="para"> Turns on/off full information display in the result. </p> </dd> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.dba-handlers-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns an array of database handlers. If <code class="parameter">full_info</code> is set to <strong><code>TRUE</code></strong>, the array will be associative with the handlers names as keys, and their version information as value. Otherwise, the result will be an indexed array of handlers names. </p> <blockquote class="note"><p><strong class="note">Note</strong>: <p class="para"> When the internal cdb library is used you will see <em>cdb</em> and <em>cdb_make</em>. </p> </p></blockquote> </div> <div class="refsect1 examples" id="refsect1-function.dba-handlers-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="openssl_spki_export.example.keygen"> <p><strong>Example #1 <span class="function"><strong>dba_handlers()</strong></span> Example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br /><br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"Available DBA handlers:\n"</span><span style="color: #007700">;<br />foreach (</span><span style="color: #0000BB">dba_handlers</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">) as </span><span style="color: #0000BB">$handler_name </span><span style="color: #007700">=> </span><span style="color: #0000BB">$handler_version</span><span style="color: #007700">) {<br /> </span><span style="color: #FF8000">// clean the versions<br /> </span><span style="color: #0000BB">$handler_version </span><span style="color: #007700">= </span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'$'</span><span style="color: #007700">, </span><span style="color: #DD0000">''</span><span style="color: #007700">, </span><span style="color: #0000BB">$handler_version</span><span style="color: #007700">);<br /> echo </span><span style="color: #DD0000">" - </span><span style="color: #0000BB">$handler_name</span><span style="color: #DD0000">: </span><span style="color: #0000BB">$handler_version</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> Available DBA handlers: - cdb: 0.75, Revision: 1.3.2.3 - cdb_make: 0.75, Revision: 1.2.2.4 - db2: Sleepycat Software: Berkeley DB 2.7.7: (08/20/99) - inifile: 1.0, Revision: 1.6.2.3 - flatfile: 1.0, Revision: 1.5.2.4 </pre></div> </div> </div> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.dba-firstkey.html">dba_firstkey</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.dba-insert.html">dba_insert</a></div> <div class="up"><a href="ref.dba.html">DBA Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>