xref: /PHP-7.2/ext/simplexml/tests/bug74950.phpt (revision 2874fa8f)
1--TEST--
2Bug #74950 (null pointer deref in zim_simplexml_element_getDocNamespaces)
3--SKIPIF--
4<?php
5if (!extension_loaded("simplexml")) die("skip SimpleXML not available");
6if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only");
7?>
8--FILE--
9<?php
10$xml=new SimpleXMLElement(0,9000000000);var_dump($xml->getDocNamespaces())?>
11?>
12--EXPECTF--
13Fatal error: Uncaught Exception: Invalid options in %sbug74950.php:%d
14Stack trace:
15#0 %sbug74950.php(%d): SimpleXMLElement->__construct('0', 9000000000)
16#1 {main}
17  thrown in %sbug74950.php on line %d
18