mirror of
https://github.com/php/php-src.git
synced 2026-04-26 09:28:21 +02:00
661bce47ae
Per documentation, and consistent with other preg functions, we should return false if an error occurred.
11 lines
216 B
PHP
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)
|