Title: Recursive function
Last modified: October 30, 2018

---

# Recursive function

 *  Resolved [Mostafa Shahiri](https://wordpress.org/support/users/mostafadeveloper/)
 * (@mostafadeveloper)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/recursive-function-2/)
 * Hi
 * I know using the recursive functions is not a traditional way of coding for many
   of web developers, but sometimes it is a very useful way for solving problems.
   Some web developers say that recursive functions increase resource utilization
   on servers and are not good ideas in practice. Is it true?
    I want to use a recursive
   function in my plugin but I don’t know is it allowed to use recursive functions
   in WordPress plugins or not?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/recursive-function-2/#post-10831497)
 * If the algorithm is best solved with a recursive function, then it’s okay to 
   use that. But be very careful about them, and test thoroughly.
 *  Thread Starter [Mostafa Shahiri](https://wordpress.org/support/users/mostafadeveloper/)
 * (@mostafadeveloper)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/recursive-function-2/#post-10831522)
 * [@joyously](https://wordpress.org/support/users/joyously/) Thanks you for your
   reply. I want to use it for displaying some HTML tags like repeatable lists or
   some tree-like structures.
 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/recursive-function-2/#post-10831552)
 * If you look at the core code for the Menu functions, there are classes that do
   that, recursively.
    [Walker](https://developer.wordpress.org/?s=walker)
    -  This reply was modified 7 years, 5 months ago by [Joy](https://wordpress.org/support/users/joyously/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Recursive function’ is closed to new replies.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [recursive](https://wordpress.org/support/topic-tag/recursive/)
 * [resource](https://wordpress.org/support/topic-tag/resource/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 2 participants
 * Last reply from: [Joy](https://wordpress.org/support/users/joyously/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/recursive-function-2/#post-10831552)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
