views:

326

answers:

1

Given that CakePHP 1.2 supports both PHP 4 and 5, what's the politics on writing plug-ins, helpers, components etc to be shared with the public that only run in PHP5?

I want to be better my own code, properly marking functions as protected or private which is only possible in PHP5, but at the same time make reusable code that benefits others.

+3  A: 

If you look around on the bakery there are quite a bit of extra bits for cake that run in php4> and some that require php5, There is nothing wrong with writing a great plug-in using php5 and releasing it to the public as php5 contains many improvements that php needs.

In my opinion php4 is a dieing breed, with cake2 moving to php5 only due to the amount of speed increases and php5 being out for so long i don't see much reason in writing php4 only apps just because someone who has not gotten around to upgrading their web server can use your plug-in.

Shard