-2

Im paying for hosting on some server and they obviously update every time there's a new php version out.

Now I've heard that all the old functions like mysql_insert_id , mysql_query , mysql_select_db and more are going to get deprecated.

How will this effect my code? will it stop working in the minute my server decides to upgrade the php version?

Charles
  • 50,943
  • 13
  • 104
  • 142
mn6vdv23g
  • 734
  • 2
  • 10
  • 33
  • 1
    Any good shared host will upgrade from one minor version to the next (e.g. 5.4.1 to 5.4.2) without warning everyone. Major versions (5.4 to 5.5) should be made available to everyone in their control panel, and a request made to switch when they are able to test. They should _not_ switch at their own convenience, though I accept some will. So, ask your host what their policy is. – halfer Sep 21 '13 at 11:09
  • 1
    *IF* your provider *indeed* does update every time there's a new php version out, you should already feel the consequences, mind you – Your Common Sense Sep 21 '13 at 11:21
  • I'm not sure where you heard that some of those functions are being deprecated. I've edited your question to reflect reality. The [PHP manual appendix](http://www.php.net/manual/en/appendices.php) has a list of changes between each version, including a list of all functions and extensions that are being deprecated. – Charles Sep 21 '13 at 22:02

2 Answers2

2

If a function is deprecated it will work for some time, except that it throws a warning each time you call it. There are deprecated functions that already do this. But in time the functions will be deleted and you won't be able to use them anymore.

Ashwini Agarwal
  • 4,828
  • 2
  • 42
  • 59
Christiaan
  • 183
  • 1
  • 12
0

In short...

Yes it will stop working, if the updated version of PHP doesn't support that function.

You have to upgrade your code according to the updated version.

Charles
  • 50,943
  • 13
  • 104
  • 142
Ashwini Agarwal
  • 4,828
  • 2
  • 42
  • 59