Too much data with var_dump in symfony2 doctrine2

后端 未结 9 1469
夕颜
夕颜 2020-11-28 02:37

I have around 40 entities and many bidirectional relationships. Whenever i use var_dump($user) or any entity my browser gets loaded with too much data of arrays and variable

9条回答
  •  半阙折子戏
    2020-11-28 03:08

    The problem is that in a bidirectional relationship both entities have a link to each other, so while displaying entity1 var_dump will also have to print all properties of entity2, which include entity1 itself giving you a loop.

提交回复
热议问题