summaryrefslogtreecommitdiff
path: root/ext/simplexml/tests/SimpleXMLElement_xpath.phpt
blob: fb7e6e90f0026a0ee218e36cdffc175efc532596 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
Testing xpath() with invalid XML
--FILE--
<?php
// gracefully recover from parsing of invalid XML; not available in PHP
const XML_PARSE_RECOVER = 1;

// we're not interested in checking concrete warnings regarding invalid XML
$xml = @simplexml_load_string("XXXXXXX^", 'SimpleXMLElement', XML_PARSE_RECOVER);
  
// $xml is supposed to hold a SimpleXMLElement, but not FALSE/NULL
var_dump($xml->xpath("BBBB"));
?>
--EXPECT--
bool(false)