xref: /PHP-8.2/ext/mbstring/tests/bug72164.phpt (revision 39131219)
1--TEST--
2Bug #72164 (Null Pointer Dereference - mb_ereg_replace)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (!function_exists('mb_ereg')) die('skip mbregex support not available');
8?>
9--FILE--
10<?php
11$var0 = "e";
12$var2 = "";
13$var3 = "";
14try {
15    $var8 = mb_ereg_replace($var2,$var3,$var3,$var0);
16    var_dump($var8);
17} catch (\ValueError $e) {
18    echo $e->getMessage() . \PHP_EOL;
19}
20
21?>
22--EXPECT--
23Option "e" is not supported
24