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