PHP help about version

php

#1

I’m a beginner in PHP and i don’t now which version is better to use .


#2

With any software, check which version is officially supported.

Normally you want the latest stable release unless you have a reason not to use it.

Take a look at the right hand side of php.net, you’ll see a list of supported versions. However, PHP 5.6 is only supported for a couple more months.


#3

Hi @ebonylorange and welcome to the SP Forums.

I would be tempted to use the same version as the Web Host Provider because some of the latest PHP features are not available on previous versions… and most likely the online error log will fill rapidly with errors and warnings.

To check for the PHP version create the following temporary file:
file: "to_delete_once_used.php"

<?php 
echo phpversion();

phpinfo();die;



#4

This page tells you the current status of supported versions, and for how long they will remain supported.


#5

The web host should not be dictating what version of Php you use. If they are behind and wont upgrade then get a new host. Your not going to run version 5.4 because that’s what the host runs are you?


#6

I agree about changing hosts… it is just unfortunate for some subscribers who took advantage of an annual discount payment. The users will have financial considerations to ponder :frowning: