Has anyone had experience with "function_exist s" not finding a function
that you KNOW you've defined? I have defined a function we'll call
"foo":
1. I know that function has been parsed, because code lower down the
script executes a function in the same include file.
2. The function name appears in the "get_defined_fu nctions" array.
3. If I just call the function (without bothering to check if it
exists), I get a return value, so the function is there.
4. if(function_exi sts('foo')) evaluates as false (so does
if(function_exi sts('foo') == true), for that matter)
5. print_r(functio n_exists('foo') ) prints nothing to the screen.
I've experimented with case to no success. function_exists is supposed
to be case-insensitive, but it doesn't seem to matter. The function
name is in lower case in get_defined_fun ctions, but looking for it with
any type of case doesn't matter -- it's just not found.
I have to be doing something wrong, but I can't figure out what.
Deane
that you KNOW you've defined? I have defined a function we'll call
"foo":
1. I know that function has been parsed, because code lower down the
script executes a function in the same include file.
2. The function name appears in the "get_defined_fu nctions" array.
3. If I just call the function (without bothering to check if it
exists), I get a return value, so the function is there.
4. if(function_exi sts('foo')) evaluates as false (so does
if(function_exi sts('foo') == true), for that matter)
5. print_r(functio n_exists('foo') ) prints nothing to the screen.
I've experimented with case to no success. function_exists is supposed
to be case-insensitive, but it doesn't seem to matter. The function
name is in lower case in get_defined_fun ctions, but looking for it with
any type of case doesn't matter -- it's just not found.
I have to be doing something wrong, but I can't figure out what.
Deane
Comment