1
0
mirror of https://github.com/php/php-src.git synced 2026-04-02 13:43:02 +02:00
Files
archived-php-src/ext/simplexml/tests/SimpleXMLElement_xpath_4.phpt
Máté Kocsis 6c8fb123d2 Promote warnings to exceptions in ext/simplexml
Closes GH-6011

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-08-25 15:15:58 +02:00

21 lines
504 B
PHP

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