All Posts Tagged With: "upgrading to php 5"

DonorsChoose Gift Certificate

Last month, I auctioned off a copy of Upgrading to PHP 5 on eBay with the proceeds going 100% to the EFF.

Today, I received an e-mail giving me a $30 gift certificate to DonorsChoose as a thank you for my eBay Giving Works listing! Cool. I didn’t know we did that.

DonorsChoose allows teachers to submit requests for projects or materials they need for their classrooms, and then allows donors to choose which ones to fund.

In recognition of my friend Jon Kline, I selected a project for the Oakland school system. It’s titled “Improve Reading Engagement with Book Club Books!“. I love the idea of students reading and discussing books in a group.

The project is now 9% of the way to it’s $762 goal. If you can, please support it, so it can achieve success.

Writing for PHP 4 and PHP 5

A few weeks ago, John Lim kindly reviewed Upgrading to PHP 5. Overall, I was very happy with his comments, particularly when he said:

Even though I have read widely about PHP5, I still found this book a useful reference, because it delves deeper into the new features than most articles I have seen.

There’s a lot of free PHP 5 material, and I was a little worried that people wouldn’t find anything new in the book. It’s a good sign if John, who reads widely on PHP 5, learns something.

He also had one critique: that I didn’t spend enough time covering how to port code from PHP 4 to PHP 5. At first, this surprised me, as I specifically provide both PHP 4 and PHP 5 code examples.

Then I realized our PHP migration experiences are totally different. When I moved to a new version (and I’ve made many, as I started PHP programming with PHP/FI, aka PHP 2), I ported internal applications. I didn’t worry about other people running my code.

In contrast, John writes ADODB. This is an external application. He’s not writing for his personal or corporate use. He’s writing for everyone and anyone.

I could control my environment. While I know people would be running under shared hosts, I figured they could at least control whether they’re using PHP 4 or PHP 5.

John, however, doesn’t have that luxury. He needs to write code that can run under both PHP 4 and PHP 5. That’s why he wants me to discuss “features such as PHP_VERSION, phpversion(), extension_loaded(), function_exists(). I don’t cover that at all.

If you need these this, I guess you’ll have to wait for the second edition. :) However, I think if I was in this situation, I’d create a separate PHP 5 branch. There are so many PHP 5 specific features that just don’t play well with PHP 4, and I wouldn’t want to limit myself.

I’m interesting in hearing what other people are doing. I’ve only been following the PEAR folks a little bit. How has this been playing out?

Upgrading to PHP 5

I’ve just finished my latest book: Upgrading to PHP 5. We’re still doing the final copy edits and proofing, but I’m happy to say that the hard part is over.

The hook to Upgrading to PHP 5 is that it only covers the new parts of PHP, so it’s perfect if you already know PHP 4. There’s no wasted pages teaching you how to process basic forms; there’s only pure PHP 5 goodness.

However, if you have no PHP experience, this book is completely useless.

It won’t be out until July, but you can already pre-order the book from Amazon.