install xebug, var_dump is smarter On Mon, Jun 7, 2010 at 5:43 PM, Pietrino Atzeni <pietrino.atz...@gmail.com>wrote:
> Hi, if you need to dump an object as an array, use the ->toArray() method > (assuming you are using Doctrine, though). > > Hope this helps, > Pietro > > > > Hi, >> >> 2010/6/7 Luis Alberto Zarrabeitia<zarrabei...@gmail.com>: >> >>> How can you dump a variable in symphony? I usually use print_r or >>> var_dump when I need to check the values/structure of a variable at >>> some point during the execution, but it seems that symphony objects >>> have some kind of circular references, because trying to use these >>> functions produces the error: >>> >>> PHP Fatal error: Allowed memory size of 134217728 bytes exhausted >>> (tried to allocate 123207681 bytes) in ... >>> >>> Is there any way to "dump" a symphony variable? (I don't really need >>> to go too deep, a shallow dump would be enough). >>> >> >> You can dump variable with var_dump(). >> >> The error appeared because you tried to dump a really large piece of data. >> >> Regards, >> Michal >> > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- Thomas Rabaix http://rabaix.net -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en