downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.get-loaded-extensions.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.info.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.get-loaded-extensions.php',
   
1 => 'get_loaded_extensions',
  ),
 
'up' =>
  array (
   
0 => 'ref.info.php',
   
1 => 'PHP Options/Info Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.get-included-files.php',
   
1 => 'get_included_files',
  ),
 
'next' =>
  array (
   
0 => 'function.get-magic-quotes-gpc.php',
   
1 => 'get_magic_quotes_gpc',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.get-loaded-extensions" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">get_loaded_extensions</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">get_loaded_extensions</span> &mdash; <span class="dc-title">Returns an array with the names of all modules compiled and loaded</span></p>

 </div>
 
 <a name="function.get-loaded-extensions.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><b>get_loaded_extensions</b></span>
    ([ <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$zend_extensions</tt><span class="initializer"> = false</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   This function returns the names of all the modules compiled and
   loaded in the PHP interpreter.
  </p>
 </div>


 <a name="function.get-loaded-extensions.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">zend_extensions</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       Return zend_extensions or not, defaults to <b><tt class="constant">FALSE</tt></b> (do not list
       zend_extensions).
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>


 <a name="function.get-loaded-extensions.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns an indexed array of all the modules names.
  </p>
 </div>


 <a name="function.get-loaded-extensions.changelog"></a><div class="refsect1 changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   </p><table class="doctable informaltable">
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left">5.2.4</td>
       <td align="left">
        The optional <i><tt class="parameter">zend_extensions</tt></i>
 parameter was added
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
 </div>



 <a name="function.get-loaded-extensions.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <b>get_loaded_extensions()</b> Example</b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">get_loaded_extensions</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents para"><p>The above example will output
something similar to:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
   [0] =&gt; xml
   [1] =&gt; wddx
   [2] =&gt; standard
   [3] =&gt; session
   [4] =&gt; posix
   [5] =&gt; pgsql
   [6] =&gt; pcre
   [7] =&gt; gd
   [8] =&gt; ftp
   [9] =&gt; db
   [10] =&gt; calendar
   [11] =&gt; bcmath
)
</pre></div>
    </div>
   </div><p>
  </p>
 </div>


 <a name="function.get-loaded-extensions.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.get-extension-funcs.php" class="function" rel="rdfs-seeAlso">get_extension_funcs()</a> - Returns an array with the names of the functions of a module</li>
    <li class="member"><a href="function.extension-loaded.php" class="function" rel="rdfs-seeAlso">extension_loaded()</a> - Find out whether an extension is loaded</li>
    <li class="member"><a href="function.dl.php" class="function" rel="rdfs-seeAlso">dl()</a> - Loads a PHP extension at runtime</li>
    <li class="member"><a href="function.phpinfo.php" class="function" rel="rdfs-seeAlso">phpinfo()</a> - Outputs lots of PHP information</li>
   </ul><p>
  </p>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites