xref: /PHP-8.0/ext/mbstring/tests/bug72164.phpt (revision 04441585)
1--TEST--
2Bug #72164 (Null Pointer Dereference - mb_ereg_replace)
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
10$var0 = "e";
11$var2 = "";
12$var3 = NULL;
13try {
14    $var8 = mb_ereg_replace($var2,$var3,$var3,$var0);
15    var_dump($var8);
16} catch (\ValueError $e) {
17    echo $e->getMessage() . \PHP_EOL;
18}
19
20?>
21--EXPECT--
22Option "e" is not supported
23