xref: /PHP-8.0/ext/mbstring/tests/bug72402.phpt (revision f8d79582)
1--TEST--
2Bug #72402: _php_mb_regex_ereg_replace_exec - double free
3--SKIPIF--
4<?php
5extension_loaded('mbstring') or die('skip mbstring not available');
6if (!function_exists('mb_ereg')) die('skip mbregex support 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