I have an include file that has various functions in it. One of them is recursive. It works just fine, but it causes problems with the other functions. If I declare another function after it, that unctions isn't recognized, and returns an "undeclared function" error.
For example:
function a() {non-recursive stuff here}
function b() { recursive stuff here}
function c() {non-recursive stuff here}
After including that file, functions a & b will work fine, but function c is reported as undeclared. Switching a and c would mean that function a was undeclared.
I have worked around this by making sure the recursive function is declared last, but now I have another function I want to declare in the same file, and its recursive as well. Is there any way to avoid this, or is it because I'm doing something wrong in my declarations (i.e. do you have to do something special with recursive declarations in php)?
Thanks for your help!