Files
php-src/ext/simplexml/tests/SimpleXMLElement_xpath_4.phpt

22 lines
484 B
PHP

--TEST--
Testing xpath() with invalid XML
--EXTENSIONS--
simplexml
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only");
?>
--FILE--
<?php
try {
simplexml_load_string("XXXXXXX^", $x, 0x6000000000000001);
} catch (Throwable $exception) {
echo $exception::class, ': ', $exception->getMessage(), "\n";
}
?>
--EXPECTF--
Warning: Undefined variable $x in %s on line %d
ValueError: simplexml_load_string(): Argument #3 ($options) is too large