Zend - The PHP Company




External

Add Code


List Loaded Extensions  

Type: code fragment
Added by: florinl
Entered: 21/03/2001
Last modified: 04/12/2000
Rating: ***** (3 votes)
Views: 6825
Lists PHP extensions and there functions. It's a simple code, maybe it will be useful to somebody. Thanks to Cezary K. Wagner for fix code to avoid warnings.


<?php

echo "<h3>PHP Loaded Extensions:</h3>";

function 
extFunctions($ext)
{
    
$extFuncs get_extension_funcs($ext);
    while(list(
$fid$fname) = each($extFuncs))
    {
        echo 
" - " . ($fid 1) . $fname <br>";
    }
}

echo 
"| <a href='$PHP_SELF'>Extensions Only</a> | <a href='$PHP_SELF?expand=*'>Expand functions</a> |<br>";

$loaded get_loaded_extensions();

while(list(
$id$name) = each($loaded))
{
    echo 
"<b>" . ($id 1) . " <a href='$PHP_SELF?expand=$name'>$name</a></b><br>";
    if(isset(
$expand))
         if(
$expand == $name || $expand == "*")
        
extFunctions($name);
}

?>


Usage Example




Rate This Script





Search



This Category All Categories