PHP Recursive Function
PHP also supports recursive function call like C/C++. In such case, we call current function within function. It is also known as recursion.
It is recommended to avoid recursive function call over 200 recursion level because it may smash the stack and may cause the termination of script.
Example 1: Printing number
1 2 3 4 5
Example 2 : Factorial Number
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week