summaryrefslogtreecommitdiff
path: root/ext/simplexml/tests/bug61597.phpt
blob: 65fa6be7721be6443bae9bdbe8affe86298f89c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
Bug #61597 (SXE properties may lack attributes and content)
--SKIPIF--
<?php
if (!extension_loaded('simplexml')) die('skip simplexml extension not available');
?>
--FILE--
<?php
$xml = <<<'EOX'
<?xml version="1.0"?>
<data>
<datum file-key="8708124062829849862">corn</datum>
</data>
EOX;

var_dump(simplexml_load_string($xml));
?>
--EXPECTF--
object(SimpleXMLElement)#%d (1) {
  ["datum"]=>
  object(SimpleXMLElement)#%d (2) {
    ["@attributes"]=>
    array(1) {
      ["file-key"]=>
      string(19) "8708124062829849862"
    }
    [0]=>
    string(4) "corn"
  }
}