1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00
Files
archived-php-src/ext/pcre/tests/bug76127.phpt
T
Nikita Popov 661bce47ae Fixed bug #76127
Per documentation, and consistent with other preg functions, we
should return false if an error occurred.
2019-03-19 13:57:39 +01:00

11 lines
216 B
PHP

--TEST--
Bug #76127: preg_split does not raise an error on invalid UTF-8
--FILE--
<?php
var_dump(preg_split("/a/u", "a\xff"));
var_dump(preg_last_error() == PREG_BAD_UTF8_ERROR);
?>
--EXPECT--
bool(false)
bool(true)