xref: /PHP-7.3/ext/xml/tests/bug73135.phpt (revision f1d7e3ca)
1--TEST--
2Bug #73135 (xml_parse() segmentation fault)
3--SKIPIF--
4<?php if (!extension_loaded('xml')) die('skip xml extension not loaded'); ?>
5--CREDITS--
6edgarsandi - <edgar.r.sandi@gmail.com>
7--FILE--
8<?php
9    function start_elem($parser, $xml) {
10        xml_parse($parser, $xml);
11    }
12
13    $xml = <<<HERE
14    <a xmlns="ahihi">
15        <bar foo="ahihi"/>
16    </a>
17HERE;
18
19    $parser = xml_parser_create_ns();
20    xml_set_element_handler($parser, 'start_elem', 'ahihi');
21    xml_parse($parser, $xml);
22?>
23--EXPECTF--
24Warning: xml_parse(): Unable to call handler ahihi() in %s%ebug73135.php on line %d
25
26Warning: xml_parse(): Unable to call handler ahihi() in %s%ebug73135.php on line %d
27