What exactly does 'return 1;' do and why do we need it?
#5

Functions only need to return a value if that value is being used somewhere. Returning 0 or 1 in the default callbacks will tell the script whether or not to call the callback in other scripts.

If the return value is of no importance then the return statement can be omitted. Alternatively, if you have conditions in your function you may put return without any value.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)