Which is the best version Xampp / PHP , to update and what’s the difference?

Asked

Viewed 1,855 times

2

I want to update my XAMPP Version: 1.8.3, plus PHP Version 5.5.15, but I have some questions:

  • What is the best version to upgrade, if it is (5.5.38, 5.6.24 & 7.0.9)?
  • Whether this will affect my codes or not?
  • If there is any difference between these versions ?
  • 3

    In short, the PHP lifecycle is here: http://php.net/supported-versions.php - The least you can use is versions with security fix, the rest is detail.

  • Because, it is a system of frequent use, and I am analyzing better so that it does not end up affecting, causing problem, waste of time, to solve. And with that, I will make a backup and test first on the test machine before. Thanks more help from all. : D

  • 1

    Between 5.5.x and 5.6.x there will be no significant changes that cause disorders. Maybe some regex or a return of function give dick, but there you fix without much difficulty. If you want less work, don’t skip straight to 7. But I recommend you try migrating to this latest version php7 so you don’t get stuck in time. The market will run you over if you stop on the way.

2 answers

7

There are two things to consider:

Security

It is essential to use at least PHP versions that have security fix, that even if they do not receive new updates, they have fixed vulnerabilities.

To know the life cycle of PHP, there is an official link with a reasonably clear chart, in the following link:

http://php.net/supported-versions.php

Using the versions that are still on the chart for the current date, everything is OK. Knowing the end of the product lifecycle helps you organize to upgrade in time to take no risks.


Resources

With each new version, the available features are changed, new features are added, existing features are improved (not always, but it is expected), and there are usually internal improvements of functionality, increasing the speed and stability of the language (within what the PHP base allows).

Some functions are removed, or marked for removal (indicated in the documentation as deprecated, often translated wrong to "depreciated", which is not the same thing).

This alone is no reason to upgrade, if you don’t really need these improvements. Often the risk of breaking some existing application does not justify the rush in changing versions.

For version change, it is recommended to consult the changelog and update notes with care, and evaluate where this will affect your applications.

The most detailed guidelines for change of version are here:

http://php.net/manual/en/appendices.php

By following these guides, you can anticipate and update the applications for a smoother change, and then do the upgrade.


Other components of XAMPP

Activate PHP as the most complex element in the set, but the same reasoning applies to Apache Mysql/Mariadb and any other component.

I would recommend, including, nay use XAMPP in these cases, but install separately each of the components, because the life cycle of each is completely different. XAMPP is excellent for quick installation on a development and testing machine.

For use in a production environment, it’s starting to remind me of those old Tvs that came with a built-in VHS device. It can be convenient when installing, but if you need to change/fix anything, it is more work.

4

It goes according to your need. At the moment I am using the version 5x stable.

There are just a few things you should stick to.

For example, in the version 7x php, some functions have been removed.

In the documentation you have this example below

class foo {
  function foo() {
    echo 'Eu sou um construtor';
  }
}

In version 7x it will generate the following error

Deprecated: Methods with the same name as their class will not be      constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3

We still have the function ldap_sort() which has been discontinued and mysql_*() that have been removed. Of course, there are several changes from 5x to 7x version, but depending on your application, it may not be affected at all.

Updating

Versions prior to 5.6 have been discontinued. See more on this link.

  • 1

    5x is not stable. 5.6 is stable 5.5 is old and anything before that was discontinued. The ideal is to always use the newest version but we know that the reality of Brazilian lodging prevents this from happening.

  • You are rushing into saying "anything before that (5.5) has been discontinued. We can’t pass this kind of thing on to the people who are starting.

  • 1

    Any version before 5.5 is discontinued. This is undeniable fact. There is no precipitation in my comment. Recommending versions below 5.6 in production is the kind of thing that makes people who are starting to spend twice as much work to learn a simple language like PHP.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.