View Full Version : List all functions and arguments
Princeton
03-07-2006, 05:48 PM
does anyone have a script that will list all functions/arguments found in files under a particular folder?
thanks
rossco_2005
03-07-2006, 08:03 PM
You want it just to open all files in a folder, explode at 'function ' and then at ' ' to find all functions?
That shouldnt be too hard if you want it made.
Princeton
03-07-2006, 08:33 PM
I'm currently not on my computer; but, if you have a script that is available that would be great
NOTE: it doesn't have to be perfect ...
rossco_2005
03-07-2006, 09:33 PM
<?php
function print_functions($file)
{
echo "<h1>Functions in $file</h1>";
$file = highlight_file($file,true);
$functions = explode('<font color="#007700">function </font><font color="#0000BB">',$file);
unset($functions[0]);
foreach ($functions AS $function)
{
$name=explode('</font>',$function);
echo $name[0].'<br />';
}
}
print_functions('./vb354/includes/functions.php');
?>
Best I can come up wiht without spending too much time on it. :)
Princeton
03-07-2006, 09:41 PM
thanks rossco ... not exactly what I was looking for :up:
I'm at home now so I'll take it from here.
thank you
rossco_2005
03-07-2006, 10:05 PM
What did you want? :P
Let me know how it works out, I want to see the final code you come up with.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.