summaryrefslogtreecommitdiff
path: root/ext/simplexml/tests/bug48601.phpt
blob: 20d6060a365b7996b4c00c0d7fbe5b45883cae7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Bug #48601 (xpath() returns FALSE for legitimate query)
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php

$sxe = simplexml_load_string('<root><node1>1</node1></root>');

$nodes = $sxe->xpath("/root/node2/@test");

if (! is_array($nodes)) {
    echo "An error occurred\n";
} else {
   echo "Result Count: " . count($nodes) . "\n";
}

?>
--EXPECT--
Result Count: 0