NeilFawcett Posted March 10, 2017 Share Posted March 10, 2017 (edited) Having upgrade from PHP 5.3 to 5.5 I can see some warning along the lines of:- PHP Deprecated: Function split() is deprecated in /xxxxxxxxxx.php(791) : eval()'d code on line 2 Now, is this reporting a problem? Or it is just a warning that can be ignored? The manual suggests it's still in 5.5? - http://php.net/manual/en/function.split.php So is this an urgent issue for the moment, and I can track down the code in the coming weeks knowing it's just a warning as such? Edited March 10, 2017 by NeilFawcett Quote Link to comment https://forums.phpfreaks.com/topic/303419-php-55-php-deprecated-function-split-safe-to-leave-it/ Share on other sites More sharing options...
requinix Posted March 10, 2017 Share Posted March 10, 2017 Fix it now. If you don't you'll put it off until eventually you have to fix it, and that just means more work on top of what you'll already be forced to do. It also clutters your error log with warnings and you'll get in the habit of ignoring all warnings and that's really bad. Oh, and Or it is just a warning that can be ignored?There are almost no warnings that can be ignored. Quote Link to comment https://forums.phpfreaks.com/topic/303419-php-55-php-deprecated-function-split-safe-to-leave-it/#findComment-1544045 Share on other sites More sharing options...
kicken Posted March 10, 2017 Share Posted March 10, 2017 Warning This function was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0. It's been removed in PHP7, so no it's not something you can just ignore. At 5.5 (which is already past it's end-of-life date) it's not a major problem but it will become a major problem when you finally get to a modern version of PHP. So how major it is depends on how long you wait to get PHP upgraded the rest of the way. Regardless, make sure you fix it soon and don't ignore it / forget about it. Quote Link to comment https://forums.phpfreaks.com/topic/303419-php-55-php-deprecated-function-split-safe-to-leave-it/#findComment-1544047 Share on other sites More sharing options...
NeilFawcett Posted March 10, 2017 Author Share Posted March 10, 2017 (edited) It's been removed in PHP7, so no it's not something you can just ignore. At 5.5 (which is already past it's end-of-life date) it's not a major problem but it will become a major problem when you finally get to a modern version of PHP. So how major it is depends on how long you wait to get PHP upgraded the rest of the way. Regardless, make sure you fix it soon and don't ignore it / forget about it. Sorry, my point is, is that warningsaying, "something serious is wrong now!" Or, "this needs attention soon?" ie: If I fix it in a couple of weeks, that's OK? For the meantime it will work just as per PHP 5.3? What's odd, is I didn't get that warning under PHP 5.3? ps: I'm not entirely sure what script is causing the error, so I'll probably FTP the entire site down and then do a search for the command being used... Edited March 10, 2017 by NeilFawcett Quote Link to comment https://forums.phpfreaks.com/topic/303419-php-55-php-deprecated-function-split-safe-to-leave-it/#findComment-1544054 Share on other sites More sharing options...
requinix Posted March 10, 2017 Share Posted March 10, 2017 No, it's not an urgent matter. You can prioritize it below other things that are actively impacting your site. But next time you're in that code you should fix it. Actually, forget that last bit. It will take you seconds to fix (explode() for simple strings or preg_split() for regular expressions) so you might as well just do it now. And you don't get the warning in 5.3 because it wasn't deprecated in 5.3. :-\ 1 Quote Link to comment https://forums.phpfreaks.com/topic/303419-php-55-php-deprecated-function-split-safe-to-leave-it/#findComment-1544057 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.