Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9142569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:48:44+00:00 2026-06-17T09:48:44+00:00

On xDebug they limit how many times a function can be nested, are there

  • 0

On xDebug they limit how many times a function can be nested, are there any disadvantages of nesting functions for so many times?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:48:45+00:00Added an answer on June 17, 2026 at 9:48 am

    Yes.

    Each time you call a function from within another function, you add one level to the stack.

    The past function calls have not yet returned, so the memory they claimed for local variables cannot be deallocated; it remains resident until the whole stack is unwound.

    Imagine you were to throw an exception from inside a function 1,000 calls deep. In order to generate a stack trace, it would have to walk upward through 1,000 function calls, putting them all into the exception object.

    There’s nothing you can do with recursion that deep which you couldn’t do instead with a well-written loop, and the loop would be both more memory-efficient (as it doesn’t have to have the stack frame overhead for each function invocation) and time-efficient (as it doesn’t have the overhead of actually performing the function calls you removed).

    It is exceedingly unlikely that a program which reaches a recursion level of 1,000 is behaving as intended. More likely, it’s stuck in infinite recursion and will eventually exhaust all the system’s RAM. Better to kill it earlier.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

By default Xdebug will dump any exception regardless of whether it is caught or
I have Xdebug 2.1 installed, and running with PHP 5.2.13. It can successfully connect
I went to the xdebug site, but I can't find a mac download. http://www.xdebug.org/download.php
I have installed Xdebug, and I can confirm from phpinfo() that it is correctly
Can I change option xdebug.profiler_output_name in runtime to specify application modules profiling?
I can't use Xdebug to debug an application built with Code Igniter, but I
On many different sources you can read about time keeping issues in virtual machines.
i've been trying to enable Xdebug for Mac OS X Lion, but can't make
Xdebug is loaded, but not loaded as a zend extension. What does it mean?
Hi I'm using XDEBUG to debug my WordPress code, is it possible to view

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.