SimpleXMLElement_xpath_2.phpt 622 B

12345678910111213141516171819202122
  1. --TEST--
  2. Testing xpath() with invalid XML
  3. --SKIPIF--
  4. <?php
  5. if (PHP_MAJOR_VERSION != 5) die("skip this test is for PHP 5 only");
  6. if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only");
  7. ?>
  8. --FILE--
  9. <?php
  10. $xml = simplexml_load_string("XXXXXXX^",$x,0x6000000000000001);
  11. var_dump($xml->xpath("BBBB"));
  12. ?>
  13. --EXPECTF--
  14. Notice: Undefined variable: x in %s on line %d
  15. Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in %s on line %d
  16. Warning: simplexml_load_string(): XXXXXXX^ in %s on line %d
  17. Warning: simplexml_load_string(): ^ in %s on line %d
  18. bool(false)