The PHP manual for split() says
This function has been DEPRECATED as
of PHP 5.3.0. Relying on this feature
is highly discouraged…Useexplode()
instead.
But I can’t find a difference between split() and explode(). join() hasn’t been deprecated, so what gives?
It’s been deprecated because
explode()is substantially faster because it doesn’t split based on a regular expression, so the string doesn’t have to be analyzed by the regex parserpreg_split()is faster and uses PCRE regular expressions for regex splitsjoin()andimplode()are aliases of each other and therefore don’t have any differences.