SimpleXMLElement_xpath_3.phpt 532 B

1234567891011121314151617181920
  1. --TEST--
  2. Testing xpath() with invalid XML
  3. --SKIPIF--
  4. <?php
  5. if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
  6. ?>
  7. --FILE--
  8. <?php
  9. $xml = simplexml_load_string("XXXXXXX^",$x,0x6000000000000001);
  10. var_dump($xml->xpath("BBBB"));
  11. ?>
  12. --EXPECTF--
  13. Notice: Undefined variable: x in %s on line %d
  14. Warning: simplexml_load_string() expects parameter 3 to be int, float given in %s on line %d
  15. Fatal error: Uncaught Error: Call to a member function xpath() on null in %s:%d
  16. Stack trace:
  17. #0 {main}
  18. thrown in %s on line %d