September 9, 2007

PHP4

Filed under: ZenMagick — DerManoMann @ 11:01 pm

With PHP6 coming the days of PHP4 are numbered. Following the example of many other PHP projects I have decided that as of February 2008 I will no longer support PHP4 (at least if I need newer features I’ll not hesitate to use them).

There is no immediate need to convert any code - ZenMagick works just fine with PHP5 (haven’t looked at PHP6 yet). There are, however, a couple advantages that I would like to use in the future:

  • Interfaces
    There are a few classes in ZenMagick that actually should be interfaces rather than classes.
  • Protected and private class variables
    Currently, all class members are visible. They are not documented in the API docs, but it’s still possible to use them. I’d like to change that, even though this will mean that ZenMagick itself will have to behave better :)
  • Reference handling
    Coming from Java, reference handling (or the lack thereof) in PHP4 drives me mad. PHP5 will allow to get rid of a number of ugly hacks I had o use to get around some of those problems. I also suspect that proper references everywhere should allow for a small performance win - creating copies of all the objects (in particular categories!) does take some time after all.

I will explain any dependencies on PHP5 as they appear, so sites still depending on PHP4 should have a chance to port stuff back to PHP4.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.