Re: [PHP-DEV] SimpleXML bug with the properties hash

2011-05-13 Thread Andrew Curioso
Thank you. That makes sense. I attached the ".txt" version this time. Hopefully that works. 2011/5/13 Johannes Schlüter > On Fri, 2011-05-13 at 19:43 -0400, Andrew Curioso wrote: > > I attached a diff of my changes. > > This didn|T come through. Make sure it is send as text&plain *for > isntan

Re: [PHP-DEV] SimpleXML bug with the properties hash

2011-05-13 Thread Johannes Schlüter
On Fri, 2011-05-13 at 19:43 -0400, Andrew Curioso wrote: > I attached a diff of my changes. This didn|T come through. Make sure it is send as text&plain *for isntance name it .txt( johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub

[PHP-DEV] SimpleXML bug with the properties hash

2011-05-13 Thread Andrew Curioso
I'm looking for feedback since this is my first commit to PHP and it changes some behavior of SimpleXMLElement. If no-one has an objections I'll go ahead and commit the code. First, here is the original bug: ---BEGIN-- $string = ' Blah 1 Blah 2 Blah 3 Blah 4 '; $foo = simp

Re: [PHP-DEV] SimpleXML bug

2003-09-04 Thread Zeev Suraski
We can (and I think we should) solve the attribute/child node ambiguity using the new array-syntax overloading, i.e., use $root['child'] for the attribute, and $root->child for nested elements. We should definitely stay away from having to use functions, either way. As for the array behavior,

Re: [PHP-DEV] SimpleXML bug

2003-09-04 Thread Shane Caraveo
The problem is one of simplicity ;) I ran into the same problem a couple days ago. In the two examples, an array of element 'child' is expected. That array may be one or more elements. SimpleXML turns multiple children of the same element name into array's, but a single child is not. I'm not

Re: [PHP-DEV] SimpleXML bug

2003-09-04 Thread Sterling Hughes
Zeev seems to be working on foreach and simplexml, but the above behaviour is the correct one. Why should the first loop? If I did: what would i get? -Sterling On Thu, 2003-09-04 at 18:24, Sebastian Bergmann wrote: > The following script > > $root = simplexml_load_string(' >

Re: [PHP-DEV] SimpleXML bug

2003-09-04 Thread Sebastian Bergmann
Zeev Suraski wrote: > Don't get anywhere near foreach and SimpleXML right now. It's in the > works :) Okay :) -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/ -- PHP Int

Re: [PHP-DEV] SimpleXML bug

2003-09-04 Thread Zeev Suraski
Don't get anywhere near foreach and SimpleXML right now. It's in the works :) Zeev At 19:24 04/09/2003, Sebastian Bergmann wrote: The following script '); foreach ($root->child as $child) { var_dump($child); } ?> does not print anything while

[PHP-DEV] SimpleXML bug

2003-09-04 Thread Sebastian Bergmann
The following script '); foreach ($root->child as $child) { var_dump($child); } ?> does not print anything while '); foreach ($root->child as $child) { var_dump($child); } ?> correctly prints o