NYCPHP Meetup

[nycphp-talk] mystery parameter for process method in PEAR, HTML_QuickForm

Dan Cech dcech at phpwerx.net
Wed Jun 16 08:48:33 EDT 2004


Adam Maccabee Trachtenberg wrote:
> On Wed, 16 Jun 2004, Jayesh Sheth wrote:
>>I guess PHP has the unusual concept of "user defined" or "variable"
>>functions (I remember seeing something similar in the lib/main.php file
>>of WikkiTikkiTavi) ... and it is passing the array of submitted data as
>>a parameter to whatever the user-defined call-back function is.
> 
> This is an old school programming convention. In LISP people often
> define functions on the fly and invoke them.

Yeah, the good old 'anonymous' or 'lambda' function, very useful for 
little jobs... The majority of php programmers have probably used 
create_function (http://php.net/create_function) at one time or another, 
if only for feeding it to array_(map|reduce|walk) or usort.

Dan




More information about the talk mailing list