PHP5 -- some good news for a change...

Fred puissante at biz.puissante.com
Thu Mar 10 08:56:01 EST 2005


For those of you interested in PHP5 or thinking to switch...

I have to give a thumbs up for PHP5 (5.0.3). Works great. I've been
running it in a production mode on two production servers for over a
month now and I've had no problems.

If you are installing it on RH9 and need cURL and XML funtionality, you
will have to upgrade those by hand to get PHP5 to build. The .configure
will tell you what it needs. This was my only bugaboo.

Your code will have to be altered slightly if you are going from PHP4 to
PHP5, but there are lots of details of these issues both published in
books and online. I basically made all the changes in less than a day.
The biggest gotcha is how objects are passed. In PHP5, they are passed
by reference by default, not by value (i.e. copied). Use the 'clone'
keyword if you need a copy.

I like being able to use exception handling, a big win for PHP5. My only
complaint is that the PEAR and PHP libraries does not yet make use of
them to any significant degree.

If you have a big need to use 3rd party PHP code, it will probably be a
big issue if they are not written for PHP5. I understand that you can
configure PHP5 to behave like PHP4, but I have not looked at the
details. There are also tricks you can do to run both PHP4 and PHP5 on
the same server, but this would involve renaming the extensions of one
code base or the other. 

Overall, I am pleased. And now back to cranking out more PHP code!

I've actually heard some bitch that PHP is becoming more and more like
Java. I couldn't understand what their complaint is. So what? It then
occurred to me that those who are bitching probably like writing bad
code, and OOP techniques and exception handling would probably be lost
on them. Too bad. However, PHP5 will still allow them to write bad code
anyway.

I dunno. I always have found it just as easy to write good code as bad
code, and good code saves you time in the long run. So why not do it
right the first time? Besides, there are scores of bad code writers
around the world that are willing to do it for a fraction of what we are
paid here in the US.

I can't say I can complain about that -- I've come across *lots* of bad
code in my career, and was paid well to *fix* said stuff when it became
critical. Not that I didn't enjoy the $$$$, but really I was appalled by
the waste in both time and resources. Such wastes cannot go unabated
forever. Duh. Sad statement, but true. With something like 1/3 to 1/2 of
all software projects failing in the US, is it any surprise to anyone
that all this stuff has been outsourced?

Well, there is far more to that story than that, of course.

And now an end to my ranting. Must be Thursday. I could never get the
hang of Thursdays.

-- 
Fred Mitchell, HydraNuke.com
E-Commerce and Hosting Solutions 
Whatever you want, we'll make it happen
(603)557-5986





More information about the gnhlug-discuss mailing list