Annotation of embedaddon/php/ext/simplexml/tests/bug48601.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #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:
! 12: if (! is_array($nodes)) {
! 13: echo "An error occured\n";
! 14: } else {
! 15: echo "Result Count: " . count($nodes) . "\n";
! 16: }
! 17:
! 18: ?>
! 19: --EXPECTF--
! 20: Result Count: 0
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>