-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhi.php
More file actions
31 lines (23 loc) · 779 Bytes
/
hi.php
File metadata and controls
31 lines (23 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
$file = __DIR__.'/functions.php';
print_r($file);
$functions = get_defined_functions();
print_r($functions);
echo '<table>';
echo '<tr><th>Function name</th><th>Description</th><th>Parameters</th><th>Return value</th></tr>';
foreach ($functions['user'] as $function) {
$reflection = new ReflectionFunction($function);
if ($reflection->getFileName() === $file) {
echo '<tr>';
echo '<td>' . $function . '</td>';
echo '<td>' . $reflection->getDocComment() . '</td>';
echo '<td>';
foreach ($reflection->getParameters() as $param) {
echo '$' . $param->getName() . ' ';
}
echo '</td>';
echo '<td>' . $reflection->getReturnType() . '</td>';
echo '</tr>';
}
}
echo '</table>';