ok Posted October 19, 2008 Share Posted October 19, 2008 Hi guys. I want my php programming skills to fit on different version as many version as possible. Is there an article that teaches this issue, or what are the things that i should consider. I just want my codes universal on different version. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/129027-writing-php-to-fit-on-all-php-version/ Share on other sites More sharing options...
JasonLewis Posted October 19, 2008 Share Posted October 19, 2008 Why? You shouldn't need to code for anything less than like PHP 4.4.0. Even then you would probably only be coding for the latest version 4. I'm code for PHP5, and don't really think of PHP4. That's just me though. Maybe I'm bad. Quote Link to comment https://forums.phpfreaks.com/topic/129027-writing-php-to-fit-on-all-php-version/#findComment-668889 Share on other sites More sharing options...
ok Posted October 19, 2008 Author Share Posted October 19, 2008 Because different hosting use different version of php. And to avoid headache when you transfer your system into different server that support different version of php. yeah i agree codes that fit with 4.0 and higher. i don't care 3.9 or lower since they are really useless and very outdated. Quote Link to comment https://forums.phpfreaks.com/topic/129027-writing-php-to-fit-on-all-php-version/#findComment-668913 Share on other sites More sharing options...
JasonLewis Posted October 19, 2008 Share Posted October 19, 2008 I would think most hosts to be using the latest version of PHP4, which is 4.4.9. Only tips I can give you are when you are using a function, if you really want it to work on PHP4, check the manual and at the top it tells you what versions the function will run on. Quote Link to comment https://forums.phpfreaks.com/topic/129027-writing-php-to-fit-on-all-php-version/#findComment-668916 Share on other sites More sharing options...
corbin Posted October 19, 2008 Share Posted October 19, 2008 I code for just PHP5 x.x. I'm stubborn though. Quote Link to comment https://forums.phpfreaks.com/topic/129027-writing-php-to-fit-on-all-php-version/#findComment-668962 Share on other sites More sharing options...
PFMaBiSmAd Posted October 19, 2008 Share Posted October 19, 2008 Except in a very few cases, code that runs under php4 will run under php5 (given the same php.ini configurations) - http://us.php.net/manual/en/migration5.incompatible.php Most of the problems will be due to php.ini configuration differences. Unfortunately, a number of poor choices were made in early php versions, in the name of "saving the programmer a little typing" and in getting the language to do things the programmer should have been doing and only when he wanted them to be done, that have since been turned off, removed, or soon to be removed, due to the security and functional problems they caused. If you write code on a php4 system that is using the current "recommended" php.ini settings, it will run on a php5 system that is also using the current recommended php.ini settings. And code that is written to work using the current recommended php.ini settings will usually work on systems that are not using the recommended settings, but the not the other way around. Quote Link to comment https://forums.phpfreaks.com/topic/129027-writing-php-to-fit-on-all-php-version/#findComment-668974 Share on other sites More sharing options...
dropfaith Posted October 19, 2008 Share Posted October 19, 2008 i refuse to code below the current high end standards. im stubborn but i wouldnt buy a host using below the best standards and new features either.. so its all good Quote Link to comment https://forums.phpfreaks.com/topic/129027-writing-php-to-fit-on-all-php-version/#findComment-668977 Share on other sites More sharing options...
PFMaBiSmAd Posted October 19, 2008 Share Posted October 19, 2008 I was going to mention that the end of life and end of support of php4 was 10 months ago. No one should be signing up for a new hosting account that only provides php4 and those that are still on a hosting account with php4 should have checked with their host on how to upgrade their account to php5 and should have tested and modified their scripts to work under php5. Quote Link to comment https://forums.phpfreaks.com/topic/129027-writing-php-to-fit-on-all-php-version/#findComment-668982 Share on other sites More sharing options...
corbin Posted October 19, 2008 Share Posted October 19, 2008 I've yet to run into a host that doesn't have PHP5. Luckily ;p. Quote Link to comment https://forums.phpfreaks.com/topic/129027-writing-php-to-fit-on-all-php-version/#findComment-668990 Share on other sites More sharing options...
JasonLewis Posted October 19, 2008 Share Posted October 19, 2008 I don't have a host, I just do all my stuff off my local machine. So I only code for PHP5. Quote Link to comment https://forums.phpfreaks.com/topic/129027-writing-php-to-fit-on-all-php-version/#findComment-669003 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.