Forum Moderators: coopster

Message Too Old, No Replies

Programming in 5.3

Should i go back down to 5.2.x?

         

caz338

7:50 pm on Jun 11, 2011 (gmt 0)

10+ Year Member



I have started programming on my local machine in php 5.3.x and the host that I still use has php 5.2.17 on it. Now I'm wondering if I should go back and downgrade some of my code (Late Static Bindings) or just find a new host?

I really want advice on this. PHP is alway going to be going forward and I don't see any reason to program in 5.2.

Do you guys program using the latest code or do you make sure things are still safe for 5.2 and loser?

Thanks in advance.

rocknbil

5:36 pm on Jun 13, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Depends on your environment . . . where you plan to deploy. If you forsee the potential for deployment in downgraded environments, you need to implement hooks for any backwards compatible features. I have one client still on an old version of PHP, so using file_put_contents as an example in a logging function,


if (function_exists(file_put_contents)) {
file_put_contents($mail_log,$input_content,FILE_APPEND);
}
else {
if (is_writable($mail_log)) {
//
}
else { exit_prog_error("$mail_log is not writable"); }

penders

8:41 am on Jun 14, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Most shared hosts still seem to be on PHP 5.2 and won't upgrade to 5.3 for fear of breaking everything. It is for that reason I still code to 5.2.

(If you manage to find a good shared host on 5.3 post back here! :)