1. 云栖社区>
  2. PHP教程>
  3. 正文

Joshua Thjissen: Symfony, Xdebug, and maximum nesting level issues

作者:用户 来源:互联网 时间:2017-12-01 15:08:37

Joshua Thjissen: Symfony, Xdebug, and maximum nesting level issues - 摘要: 本文讲的是Joshua Thjissen: Symfony, Xdebug, and maximum nesting level issues, In this new postto his site Joshua Thjissenhas shared some of his discoveries with Xdebug, Symfony 2 and problems

In this new postto his site Joshua Thjissenhas shared some of his discoveries with Xdebug, Symfony 2 and problems with maximum nesting levels of objects in his testing.

Here you are, developing your code based on the Symfony2 framework. Creating a form here, add a Twig template there, until suddenly, boom! Your site doesn’t work anymore, and all the info you can find in your PHP logs is [an error about the maximum function nesting level being reached.

[...] What just happened? Did I create some kind of recursive function I wasn’t aware of, did somebody commit code that I accidentally pulled? Fortunately for us developers, there is a quick way to deal with this: google it...

According to the information he found via his search it's a common issue and can be "fixed" by bumping up the max_nesting_levelto a higher value. He could have stopped there but he wanted to explain why this problem happened, what the nesting is all about, how it relates to the limitations of XDebug and why Twig could cause problems with it.

以上是云栖社区小编为您精心准备的的内容,在云栖社区的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索,以便于您获取更多的相关知识。