PhpStorm 2019.3 Help

Code Inspection: Tail recursion

Reports tail recursion, that is when a function calls itselfas its last action before returning. Tail recursion can always be replaced by looping, which will be considerably faster.Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably differentperformance characteristics on different environments.

Last modified: 15 January 2020