I'm not against the usage of print_r, but in this case the description in
the doc should be accurate. Because it says the output should be
"Acme\BlogBundle\Author.name: This value should not be blank" but it's not
that at all. It's a big frightening bunch of data ;)


*Thierry Goettelmann*
Développement Web
contact@byscripts.info


2013/11/27 Christophe Coevoet <notifications@github.com>

> In book/validation.rst:
>
> > @@ -129,7 +129,7 @@ simple example from inside a controller::
> >          $errors = $validator->validate($author);
> >
> >          if (count($errors) > 0) {
> > -            return new Response(print_r($errors, true));
> > +            return new Response($errors);
>
> hmm, sorry, actually it is. I never used the string casting on it though
> (and it is there only for debugging purpose anyway, so using print_r in the
> doc would at least make it clear it is not production-ready)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony-docs/pull/3229/files#r7958077>
> .
>