<?php
arr get_extension_funcs ( str $module_name )
where,
$module_name = Name of the extension to be checked
One of the extension names
obtained through the function:
get_loaded_extensions
?>
<?php
arr get_loaded_extensions([ bool $zend_extensions = FALSE ] )
where,
$zend_extensions = if TRUE only return Zend extensions
The default, FALSE return regular extensions
?>
VALUE | WHAT RETURNS? |
FALSE | REGULAR EXTENSIONS |
TRUE | Zend EXTENSIONS ONLY |
ed48 |
<?php
$ext = "core";
// The result of this exercise will depend
// of the configuration of your system
// The module name to get the extension functions,
// in this case: core (case insentive)
if(extension_loaded($ext))
{
echo '<table width="100%" cellspacing="3"
cellpadding="3" border="1" align="center">
<tbody><tr>
<td colspan="3">' . "AVAILABLE $ext FUNCTIONS</td></tr>".
'<tr><td>NDX</td><td>FUNCTION NAME</td>
<td>EXTENSION</td></tr>';
$mod = get_extension_funcs ($ext);
foreach ( $mod as $k => $xt)
{
echo '<tr><td>' . ($k+1) . '</td><td>' . $xt .
'</td><td>' . $ext . '</td></tr>';
}
echo '<tr><td colspan="3">ed48</td></tr></tbody></table>';
}
else
{
echo 'The extension "' . $ext . '" is NOT loaded!<br>';
exit;
}
?>
<?php
$ext = "imagic";
// The result of this exercise will depend
// of the configuration of your system
// The module name to get the extension functions,
// in this case: imagic (case insentive)
if(extension_loaded($ext))
{
echo '<table width="100%" cellspacing="3"
cellpadding="3" border="1" align="center">
<tbody><tr>
<td colspan="3">' . "AVAILABLE $ext FUNCTIONS</td></tr>".
'<tr><td>NDX</td><td>FUNCTION NAME</td>
<td>EXTENSION</td></tr>';
$mod = get_extension_funcs ($ext);
foreach ( $mod as $k => $xt)
{
echo '<tr><td>' . ($k+1) . '</td><td>' . $xt .
'</td><td>' . $ext . '</td></tr>';
}
echo '<tr><td colspan="3">ed48</td></tr></tbody></table>';
}
else
{
echo "The extension \"$ext\" is NOT loaded!<br>";
exit;
}
?>
<style>
.t3 { background:#ff0; font-size:16px; text-align:center; }
.t6 { background:cyan; font-size:16px; text-align:center; }
.t7 { background:white; font-size:16px; text-align:center; }
</style>
<table width="100%" cellspacing="3" cellpadding="3"
border="1" align="center">
<tbody><tr class="t6"><td colspan="2">AVAILABLE FUNCTIONS</td></tr>
<tr class="t6"><td>NDX</td><td>NAME</td></tr>
<?php
// The result of this exercise will depend
// of the configuration of your system
$exts = get_loaded_extensions ();
$ct = count($exts);
for ($i = 0; $i < $ct; $i++)
{
$mod = (array)get_extension_funcs ($exts[$i]);
echo '<tr class="t3"><td colspan="2">( ' . $i . ' ) ' . $exts[$i] . '</tr></td>';
foreach ( $mod as $k => $v ) {
echo '<tr class="t7"><td>' . $k . '</td><td>' . $v . '</td></tr>';
} }
?>
<tr class="t6"><td colspan="2">ed48</td></tr></tbody></table>
<table width="100%" cellspacing="3" cellpadding="3"
border="1" align="center">
<tbody
<tr><td colspan="3">AVAILABLE FUNCTIONS</td></tr>
<tr><td>NDX</td><td>LIB</td><td>NAME</td></tr>
<?php
// The result of this exercise will depend
// of the configuration of your system
$exts = get_loaded_extensions (true);
foreach ( $exts as $xt) {
$exts01 = get_extension_funcs ($xt);
if( $exts01 != FALSE) {
foreach ( $exts01 as $k => $func ) {
echo '<tr><td>' . ($k+1) . '</td><td>' . $xt . '</td><td>' . $func . '</td></tr>';
}
}
}
?>
<tr><td colspan="3">ed48</td></tr>
</tbody></table>