Recursive functions are generally a bad idea especially in php.
By using a recursive function it is possible you may "smash the stack", which
will crash an apache child (segfaults) and on a multi-threaded server take
down the whole webserver.
Even with a default memory limit of 8 megs an attacke
recursion is something that can be fun and practical at times, other times
its a bad coder trying to do something they think is clever. use it wisly.
this example is purposely coded bad to show you how recursion can mess up
with bad error checking. this example will work. change to power(30) a
2 matches
Mail list logo