This PHP program demonstrates how to print all of the defined functions.
<?php // Two user-defined functions function fnHello() { echo "Hello"; } function fnWorld() { echo "World"; } $qaaFunctions = get_defined_functions(); // Loop over each set of functions foreach($qaaFunctions as $sMainKey => $qaFunctions) { // Make the heading for each group of functions echo "<ul><h3>".$sMainKey."</h3>"; // Loop over the functions in the group foreach($qaFunctions as $sKey =>$sFunction) { echo "<li>".$sKey." => ".$sFunction."</li>"; } echo "</ul>"; } ?>
© 20072024 XoaX.net LLC. All rights reserved.