EchoFool Posted August 25, 2009 Share Posted August 25, 2009 I keep getting this error all of a sudden for my split function Deprecated: Function split() is deprecated What does that mean, that split() is no longer the function to use ? Quote Link to comment https://forums.phpfreaks.com/topic/171707-split-is-deprecated/ Share on other sites More sharing options...
Alex Posted August 25, 2009 Share Posted August 25, 2009 It means exactly what it says.. Check the manual: split() It is indeed depreciated as of PHP 5.3.0, meaning it'll throw an E_DEPRECATED notice. You could still use it, but it'll be removed and not supported so it's best to find another method. Quote Link to comment https://forums.phpfreaks.com/topic/171707-split-is-deprecated/#findComment-905446 Share on other sites More sharing options...
kenrbnsn Posted August 25, 2009 Share Posted August 25, 2009 Either you or your host upgraded to PHP 5.3 The manual entry for split says: Note: As of PHP 5.3.0 the regex extension is deprecated, calling this function will issue an E_DEPRECATED notice. Read the rest of the entry for suggestions. Ken Quote Link to comment https://forums.phpfreaks.com/topic/171707-split-is-deprecated/#findComment-905447 Share on other sites More sharing options...
EchoFool Posted August 25, 2009 Author Share Posted August 25, 2009 Hmm, should i use something like explode function to replace split() ? Quote Link to comment https://forums.phpfreaks.com/topic/171707-split-is-deprecated/#findComment-905448 Share on other sites More sharing options...
corbin Posted August 25, 2009 Share Posted August 25, 2009 If you have a delimiter you can (and should use explode). If you have a regular expression pattern, you should use preg_split. Quote Link to comment https://forums.phpfreaks.com/topic/171707-split-is-deprecated/#findComment-905456 Share on other sites More sharing options...
philip.morris236 Posted June 13, 2012 Share Posted June 13, 2012 In php coding or PHP script whenever you get "split () is depricated" then just replace "split" with "explode". Because the new version of MYSQL accept explode instead of split. Quote Link to comment https://forums.phpfreaks.com/topic/171707-split-is-deprecated/#findComment-1353530 Share on other sites More sharing options...
requinix Posted June 13, 2012 Share Posted June 13, 2012 In php coding or PHP script whenever you get "split () is depricated" then just replace "split" with "explode". Wrong. split() and explode() are similar but not compatible. Because the new version of MYSQL accept explode instead of split. Wrong. I'm even not sure what you're trying to say but it sounds wrong. And apparently you didn't notice that this thread is three years old. There isn't anything left to say beyond what's already been said so there really isn't any reason to bump it. Quote Link to comment https://forums.phpfreaks.com/topic/171707-split-is-deprecated/#findComment-1353561 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.