create_function

string create_function(string arguments, string code) 
arguments String containing the arguments to be passed to the function
code String containing the code for the function

Creates a function and returns a unique name for it.

Returns:

Unique name for the function; FALSE on error

Description:

create_function() provides an alternate way to create a function. Functions created via create_function() are given arbitrary unique names. Functions created in this fashion are useful for a variety of tasks, including creating function definitions at runtime and creating callback functions for use in functions such as array_walk(), register_shutdown_function(), and usort().

The first argument should be a comma-separated list of the ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.