Hello from NZ
| From: | Gold | Date: | Thu, 07 Aug 2014 22:12:39 +0000 |
| Subject: | Hello from NZ | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969385096@lists.php.net to get a copy of this message | ||
Hey all,
Was just working on some code that required me to refresh on the Basic
SimpleXML usage page for the first time in forever.
http://php.net/manual/en/simplexml.examples-basic.php
I was about to leave a comment about the documentation and spotted the
edit link so checked that instead which lead me here to establish that I
am a human and I am interested in contributing to the docs. :)
So Hi. I'm a Drupal developer from Wellington, New Zealand and have been
working with PHP since 2000. I'm primarily working in Drupal these days
but am expecting that to change to Symphony as Drupal 8 moved to that
framework as it's underlying infrastructure. Quite looking forward to
that actually.
Anyway, the doc edit. On that page in Example 6 it is makes the point
that in order to access the value of an attribute of an element you need
to cast it as a (string). The first mention of attributes in elements
is in Example 5 and I (for one) totally missed the casting to a string
and was stumped for a bit looking at the object being returned instead
of the string.
This casting to a string should be in Example 5 and probably boxed out
to make it stand out a bit better. Something to force the readers
attention to this point.
It's a minor edit to the docs but if others are like me, it would save
many accumulated hours over the years as people are left staring at the
Object rather than the string.
Regards,
Gold