From: Operating system: Windows PHP version: 5.2.13 Package: SimpleXML related Bug Type: Bug Bug description:Getting a node with a - in it
Description:
------------
If a XML node have a - in it you can't get the data from it
<display-name>
echo $channel->display-name;
Notice: Use of undefined constant name - assumed 'name'
Test script:
---------------
<?xml version="1.0" encoding="UTF-8" ?>
<tv generator-info-name="www.ontv.dk/xmltv">
<channel id="www.ontv.dk/tv/1">
<display-name lang="dk">DR1 DK</display-name>
</channel>
</tv>
$xml = simplexml_load_string($xml);
$channels = $this->xml->xpath('//channel');
foreach($channels AS $channel) {
echo $channel->display-name;
}
Expected result:
----------------
DR1 DK
Actual result:
--------------
Notice: Use of undefined constant name - assumed 'name'
--
Edit bug report at http://bugs.php.net/bug.php?id=51525&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51525&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51525&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51525&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51525&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51525&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51525&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51525&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51525&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51525&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51525&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51525&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51525&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51525&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51525&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51525&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51525&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51525&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51525&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51525&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51525&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51525&r=mysqlcfg
