File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / simplexml / tests / bug48601.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:01 2012 UTC (12 years, 6 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_17p0, v5_3_10, HEAD
php

--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 occured\n";
} else {
   echo "Result Count: " . count($nodes) . "\n";
}

?>
--EXPECTF--
Result Count: 0

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>