list_php_functions.php

<?php

/**
 * I was interested in generating documentation programmatically
 *
 * But there are no doccoments on internal functions, probably because they're written in C, not php.
 *
 * Neat, anyway, though.
 *
 */



// function abc(){}

$all = get_defined_functions();
// print_r($all);exit;
$funcs = [];
/**
 * Sort the defined_functions into groups based upon their `prefix_` or `--none--` if no underscores in functino name
 */
foreach ($all['internal'] as $index => $name){
    $parts = explode('_',$name);

    $ref = new \ReflectionFunction($name);
    if (count($parts)==1)$funcs['--none--'][] = $name;
    else $funcs[$parts[0]][] = $name.' - '.$ref->getDocComment();
}
print_r($funcs['get']);

echo "\n\n\n";

print_r(get_declared_classes());
// print_r(get_extension_funcs('mysqlnd'));