xref: /PHP-7.2/ext/mbstring/tests/bug72402.phpt (revision 0dbb581c)
1--TEST--
2Bug #72402: _php_mb_regex_ereg_replace_exec - double free
3--SKIPIF--
4<?php
5if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
6if (!function_exists('mb_ereg_replace_callback')) die('skip mb_ereg_replace_callback() not available');
7?>
8--FILE--
9<?php
10function throwit() {
11	throw new Exception('it');
12}
13$var10 = "throwit";
14try {
15	$var14 = mb_ereg_replace_callback("", $var10, "");
16} catch(Exception $e) {}
17?>
18DONE
19--EXPECT--
20DONE
21