Welcome Guest, Not a member yet? Register   Sign In
Does this small piece of code seem ok?
#17

(10-30-2015, 09:41 AM)PaulD Wrote: That is an awesome solution!!!!

At first I was concerned that it was worse as it might hit the memory limit as php has to remember all the deeper and deeper levels of functions within functions, but that is  not how PHP works in this case (I think). It seems that it assigns the function to the variable, returns that, 'level' closed, then re-evaluates it.

I know you already find a better solution, but I'm just curious to know why you think a recursive function is better than a loop. It seems like a lot of people hate loops. I like loops. Loops are cool! Cool
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
Does this small piece of code seem ok? - by PaulD - 10-30-2015, 09:02 AM
RE: Does this small piece of code seem ok? - by includebeer - 10-30-2015, 08:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB