W3docs

Deprecated: Function split() is deprecated. How to fix this statement?

The split() function is deprecated, which means it is no longer supported and should not be used in new code.

The split() function is deprecated in PHP (removed in PHP 7.0.0), which means it is no longer supported and should not be used in new code. To fix this statement, you should use preg_split(), which performs the same task using PCRE regular expressions.

Example:

// Deprecated
$parts = split('[,]', 'apple,banana,orange');

// Modern replacement
$parts = preg_split('/[,]/', 'apple,banana,orange');