For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > September 2004 > [Q] Variable function









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [Q] Variable function
Jon

2004-09-27, 8:55 am

Hi

can somebody tell me why, if the class member checkFn holds a function name
in the following example, why:

$object->checkFn();

gives "fatal error: Call to undefined function: checkfn()"

but

$f = $object->checkFn;
$f();

Works as expected ?

Many thanks in advance.

Jon


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com