XDebug is also great to use to try and determine where bottlenecks in your code may be as you can setup it up to do function tracing and dump the data to a file which can be read by various log analysis programs and includes execution times for various functions.
On Sun, Jul 26, 2009 at 9:45 PM, John - White October <johnwa...@gmail.com>wrote: > > If you can, install xdebug and use var_dump rather than print_r. It > stops recursion after a configurable amount of times. Also makes > errors pretty... > > On Jul 26, 6:32 pm, Jake Barnes <lkrub...@geocities.com> wrote: > > On Jul 26, 7:19 am, Bernhard Schussek <bschus...@gmail.com> wrote: > > > > > > > > > Hi Lawrence > > > > > I suppose you are using Doctrine. The problem with dumping Doctrine > > > records is that they contains cyclic references. That means, a record > > > references a table, which references the record, which references the > > > table ... you get the drill. > > > > > If you try to dump this record, PHP tries to follow all these > > > references and literally goes on forever. Your error schema probably > > > contains a reference to such a Doctrine record (or any other object > > > with cyclic references) and thus is affected by this problem. > > > > > The solution is quite easy though, in your case: Use sfErrorSchema's > > > __toString() function: > > > > > print $form->getErrorSchema(); > > > > > (Note that I'm not using print_r() or var_dump(), because these don't > > > implicitly convert the object to a string) > > > > Thanks much for this, that is a hot tip. I was, in fact, using Propel, > > but I'm sure the same thing is true. I had the impression that I was > > dealing with an infinite loop, but I was having trouble imagining how > > print_r() could trigger an infinite loop. Your explanation makes a lot > > of sense. > > > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---