split() is a very common PHP function. Here I am not going to discuss its usage. But I will give a super simple solution for the error “Deprecated: Function split() is deprecated“. This error is annoying, and will happen to everyone using
split() function. So, keep reading for the super easy solution.
Why We Are Getting This Error Suddenly?
preg_split(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to split(). If you don’t require the power of regular expressions, it is faster to use explode(), which doesn’t incur the overhead of the regular expression engine.
And, apparently “split” is removed as of PHP 5.3.x, in the preparation for PHP 6.0.