★ wanayoo — archive 1999 http://www.php.net/manual/function.call-user-func.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Variables
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageHungarian version of this page
Variables
* call_user_func
* doubleval
* empty
* gettype
* intval
* is_array
* is_bool
* is_double
* is_float
* is_int
* is_integer
* is_long
* is_numeric
* is_object
* is_real
* is_resource
* is_string
* isset
* print_r
* settype
* strval
* unset
* var_dump
Manual: call_user_func
View the source code for this pageSearch the site



Previous page
 Variables
 Updated
Sat, 12 Aug 2000
doubleval 
Next page


call_user_func

(PHP3 >= 3.0.3, PHP4 )

call_user_func --  Call a user function given by the first parameter

Description

mixed call_user_func (string function_name [, mixed parameter [, mixed ...]])

Call a user defined function given by the function_name parameter. Take the following:


function barber ($type) {
    print "You wanted a $type haircut, no problem";
}
call_user_func ('barber', "mushroom");
call_user_func ('barber', "shave");
      


User Contributed Notes: call_user_func


terry@terrym.com
01-Aug-2000 08:39
<pre>
OK, so what's the point?
Why not just call it directly?
barber("shave");

OR

$func="barber";
$$func("shave");

for dynamic fuction calling.

Just trying to understand how this might be usefull.

Thanks Terry
</pre>



 About Notes


Previous page
 Variables
 Updated
Sat, 12 Aug 2000
doubleval 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.