get_defined_functions

get_defined_functions

get_defined_functions:
This function used to get all internal and user defined functions in that php file. functions in include files also listed as used defined funtion.

Syntax:
array get_defined_functions();

Example:
<?php
function fun1(){
fun1_body

}
function fun2()
{
fun2_body
}
$fun=get_defined_functions();
print_r($fun);
?>

Output:

Array
(
[internal] => Array
(
[0] => zend_version
[1] => func_num_args
[2] => func_get_arg
[3] => func_get_args
[4] => strlen


[user] => Array
(
[0] => fun1
[1] => fun2
)
)

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.