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