xref: /PHP-5.6/ext/simplexml/tests/bug48601.phpt (revision 896ac689)
1--TEST--
2Bug #48601 (xpath() returns FALSE for legitimate query)
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip"; ?>
5--FILE--
6<?php
7
8$sxe = simplexml_load_string('<root><node1>1</node1></root>');
9
10$nodes = $sxe->xpath("/root/node2/@test");
11
12if (! is_array($nodes)) {
13    echo "An error occurred\n";
14} else {
15   echo "Result Count: " . count($nodes) . "\n";
16}
17
18?>
19--EXPECTF--
20Result Count: 0
21