Since split is depracated in 5.3 and removed in 6, I am doing a quick check on some scripts I have, in which the developer is long gone and won't be doing any updates.
Luckily, there are only a few instances of "split" found and I planned on replacing them with preg_split -but it is not working. The scripts work with split (since it is just deprecated in 5.3) but won't work as "preg_split".
Obviously, I am missing something in the difference between the two - would appreciate being pointed in the right direction.
Here are two example of existing SPLIT uses, I would like to change to preg_split.
FIRST:
SECOND:Code:split("[\/]", $path); if I change this to the following it works, explode("\\", $path); but I would like to know why preg_split doesn't work.
Code:split('[\\/]', $file);




Bookmarks