Too much data with var_dump in symfony2 doctrine2

后端 未结 9 1402
夕颜
夕颜 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:20

    well formatted :

    echo '<pre>';
    \Doctrine\Common\Util\Debug::dump($user, $recurciveLevelToDisplay);
    echo '</pre>';
    
    0 讨论(0)
  • 2020-11-28 03:24

    Just use echo serialize($user);

    0 讨论(0)
  • 2020-11-28 03:27

    Simple and easy example.

    var_dump(serialize($Object));
    
    0 讨论(0)
提交回复
热议问题