note 22868 deleted from function.get-loaded-extensions by nlopess
| From: | nlopess@php.net | Date: | Wed, 14 Jan 2004 19:19:16 +0000 |
| Subject: | note 22868 deleted from function.get-loaded-extensions by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63560@lists.php.net to get a copy of this message | ||
Note Submitter: joel@prettyhipprogramming.com
----
Not sure what has been installed in your particular version of PHP? Try running this snippet and it
will list out the loaded extensions plus their functions with links to the online PHP manual.
Obviously for PHP4 or better.
<?php
// Author: Joel Ricker
// Email: joel@prettyhipprogramming.com
// URL: http://www.prettyhipprogramming.com
function usort_cmp($a, $b) {
return (strtolower($a) == strtolower($b)) ? 0 : (strtolower($a) > strtolower($b)) ? 1 : -1;
}
echo "<UL>\n";
$le = get_loaded_extensions();
usort($le, "usort_cmp");
foreach($le as $module) {
print "<LI>$module\n";
print "<UL>\n";
$f = get_extension_funcs($module);
usort($f, "usort_cmp");
foreach($f as $func) {
print "<LI><a href='http://www.php.net/manual/en/function."
. str_replace("_", "-", $func) . ".php'>$func</a>\n";
}
print "</UL>\n";
}
echo "</UL>\n";
?>