Welcome to WebmasterWorld Guest from 54.166.227.36

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Will scripts developed under PHP4 works with PHP5?

     
3:27 am on Apr 20, 2009 (gmt 0)

10+ Year Member



Hi,

My existing linux server is running PHP4. I am thinking to move some websites to a new server running PHP5. I have a question:

Will all scripts developed under PHP4 will still be working with PHP5?

Thanks and best regards

Alex

3:44 am on Apr 20, 2009 (gmt 0)

5+ Year Member



The best anyone is going to be able to tell you is: Maybe. Optimists might even go so far as to say: Probably.

Try it (on a development server--not your live server), and find out! In general, any necessary changes should be relatively minor.

3:30 am on Apr 21, 2009 (gmt 0)

10+ Year Member



Hello,

Thanks for your help.

Best regards

Alex

1:15 pm on Apr 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Personally I had no problems with the switch. Most of the code running on my server is homebrewed so I knew I hadn't used any unusual PHP4-specific functionality. If you use a lot of third party code there may be a hiccup somewhere. But the PHP folks are pretty good about maintaining backwards compatability so that things don't break when you upgrade.
1:41 pm on Apr 21, 2009 (gmt 0)

5+ Year Member



I am thinking to move some websites to a new server running PHP5.

That's a wise decision. Do it as soon as possible, because the PHP team no longer releases any security fixes for PHP4. Using PHP4 may make your server vulnerable. Seriously.

Will all scripts developed under PHP4 will still be working with PHP5?

Most scripts will work, but it's typically impossible to test everything under all possible circumstances and conditions. Therefore, you need to inspect the code (or have a PHP developer inspect it for you) following this official migration guide:

[php.net...]

[edited by: true_INFP at 1:55 pm (utc) on April 21, 2009]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month