Jump to content

PHP 5.5 - PHP Deprecated: Function split().... Safe to leave it?


Recommended Posts

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 by NeilFawcett

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.

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.

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 by NeilFawcett

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. :-\

  • Like 1
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.