1--TEST-- 2Testing xpath() with invalid XML 3--FILE-- 4<?php 5// gracefully recover from parsing of invalid XML; not available in PHP 6const XML_PARSE_RECOVER = 1; 7 8// we're not interested in checking concrete warnings regarding invalid XML 9$xml = @simplexml_load_string("XXXXXXX^", 'SimpleXMLElement', XML_PARSE_RECOVER); 10 11// $xml is supposed to hold a SimpleXMLElement, but not FALSE/NULL 12var_dump($xml->xpath("BBBB")); 13?> 14--EXPECT-- 15bool(false) 16