diff --git a/src/LevenshteinDiffCalculator.php b/src/LevenshteinDiffCalculator.php index c2cab26..f1edbaa 100644 --- a/src/LevenshteinDiffCalculator.php +++ b/src/LevenshteinDiffCalculator.php @@ -46,7 +46,7 @@ private function split($s): array if (is_array($s)) { return $s; } else { - return preg_split('/(' . $this->separatorRegex . ')/u', $s, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + return preg_split('/(' . $this->separatorRegex . ')/u', $s, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); } }