NYCPHP Meetup

NYPHP.org

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

Dan Cech dcech at phpwerx.net
Wed Jun 16 00:28:53 EDT 2004


Jayesh Sheth wrote:
> Hi Dan,
> 
> thanks a lot for your explanation. It all makes sense now. I hadn't seen 
> the call_user_func() thing before.
> 
> 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.

I'm always happy to help a fellow (confused) programmer. ;)

The idea of variable functions and using a variable as a function name 
is kind of weird, but can also allow you to do some cool tricks.

Personally I like to check with is_callable before I use a variable 
function name, just to make sure the function actually does exist, but 
other than that I don't know of any gotchas with this technique.

Dan

> It's a bit tricky, but it does seem to make sense now ...
> 
> Thanks again for your quick help!
> 
> Best Regards,
> 
> - Jay




More information about the talk mailing list