Page 1 of 1

What version of PHP to code for?

Posted: Thu Sep 26, 2002 3:21 pm
by zebrax
I recently ran into troubles with the differences in PHP versions.
I created a script for a guy who said his server had 4.1.1 on it. So I used $_POST and $_SESSION variables. I found out after finishing the script that his server had 4.0.6 on it.
I have to do back through all the code and change $_POST to $HTTP_POST_VARS and $_SESSION TO $HTTP_SESSION_VARS, and globalize them. Thas was a pain in the ass.

What version does everyone else code for, to make it portable.

Zebrax

Posted: Thu Sep 26, 2002 4:42 pm
by Takuma
If you want it to give out to someone use old vars but if it for you use the new... That's what I do :D

Posted: Thu Sep 26, 2002 4:42 pm
by jason
4.2+ usually, or whatever the client has.

If the client has a server, I will either (A) develop on my server if I am sure enough of the similiarity of the servers, or (B), develop on their server if their is a dramatic difference.