I'm starting development in PHP, and I've started to have some incompatibilities in my code. I say in case something works locally and when I upload it to the server, something goes wrong.
On the server, the PHP version is:
PHP Version 5.2.17
Locally, the PHP version is:
PHP Version 5.5.7
I would like to know the best recommendations for avoiding incompatibilities in the codes when executed locally and when run on the server, taking the php version because I know it is essential to have the same version in both. Necessary php.ini settings and etc.
A problem that I came across lately gave me a lot of headache (I discovered that it was simple after asking a question here in the forum and finding out what caused the error), simply my local%% did not generate error when a% % was called after some PHP
code, or the file was set with header();
encoding.
Even html
being enabled this way (I do not know if it has something to do with this type of error), the error was not shown. So what I want to know are the necessary settings that will leave the local server as "close" as possible to a dedicated server.