Get an array of all defined functions in PHP

Description

The following code shows how to get an array of all defined functions.

Example


//from  ww w .ja v  a  2 s. c  o m
//get_defined_functions() example


<?php
function myrow($id, $data)
{
    return "<tr><th>$id</th><td>$data</td></tr>\n";
}

$arr = get_defined_functions();

print_r($arr);
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions