xref: /PHP-8.2/ext/pcre/tests/errors02.phpt (revision aa79a22d)
1--TEST--
2Test preg_split() function : error conditions - Malformed UTF-8
3--FILE--
4<?php
5
6var_dump(preg_split('/a/u', "a\xff"));
7var_dump(preg_last_error_msg() === 'Malformed UTF-8 characters, possibly incorrectly encoded');
8
9?>
10--EXPECT--
11bool(false)
12bool(true)
13