downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ReflectionFunction::invokeArgs> <ReflectionFunction::export
Last updated: Fri, 20 May 2011

view this page in

ReflectionFunction::invoke

(PHP 5)

ReflectionFunction::invokeInvokes function

Descripción

public mixed ReflectionFunction::invoke ([ mixed $parameter [, mixed $... ]] )

Invokes a reflected function.

Parámetros

args

The passed in argument list. It accepts a variable number of arguments which are passed to the function much like call_user_func() is.

Valores devueltos

Returns the result of the invoked function call.

Ejemplos

Example #1 ReflectionFunction::invoke() example

<?php
function title($title$name)
{
    return 
sprintf("%s. %s\r\n"$title$name);
}

$function = new ReflectionFunction('title');

echo 
$function->invoke('Dr''Phil');
?>

El resultado del ejemplo sería:

Dr. Phil

Notas

Note:

If the function has arguments that need to be references, then they must be references in the passed argument list.

Ver también



add a note add a note User Contributed Notes ReflectionFunction::invoke
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites