From: regsuy at yahoo dot com
Operating system: windows, linux
PHP version: 5.2.6
PHP Bug Type: SimpleXML related
Bug description: Attributes not loading
Description:
------------
SimplyXML fails to load element attributes and values
Tried with PHP 5.2.5 and 5.2.6, on Linux and Windows systems and got the
same result.
Reproduce code:
---------------
<?php
$xmlstr = <<<XML
<?xml version="1.0"?>
<test>
<optgroup label="Non-Teen">
<option value="5">Under 5</option>
<option value="9">Five to Ten</option>
</optgroup>
<optgroup label="Teen">
<option value="10">Aspiring Teen</option>
<option value="15">Mid Teen</option>
<option value="19">End Teen</option>
</optgroup>
</test>
XML;
$xml = new SimpleXMLElement($xmlstr);
print_r ($xml);
?>
Expected result:
----------------
The $xml array should have a SimpleXMLElement containing the "value"
attribute for each "option" element
Actual result:
--------------
The "value" attributes of the "option" elements are not being loaded in
the $xml array
--
Edit bug report at http://bugs.php.net/?id=46137&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46137&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46137&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46137&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46137&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=46137&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46137&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46137&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46137&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46137&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46137&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46137&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46137&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46137&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46137&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46137&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46137&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46137&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46137&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46137&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46137&r=mysqlcfg