Quick! Raise your hand if you know the most underutilized feature in PHP? If you’re thinking type-juggling you’re wrong (that’s probably the most over-utilized feature). It is, in my mind, SPL. If you are doing any data processing whatsoever you are using arrays. And most likely you are doing database queries, iterating over the results and doing your algorithm-ing. But what if you have additional functionality that you need to have integrated with your data. You could go the traditional route and copy and paste half your application around or you could build, what we like to call structured applications. SPL allows you to do that. How? Well, that’s one of the reasons why I wrote the book “You want to do WHAT with PHP?”. Here’s your excerpt…
Communication is key to building applications now and for the future. While it is not something that I think that everyone should do, I have not seem many applications that make good use of streams in PHP. Streams can be immensely useful in the right situations, but a lot of developers are not really aware of how streams can be used. In this excerpt from chapter 4 of my book “You want to do WHAT with PHP?” I talk about how you can use streams for fun, and maybe for profit. While I don’t think you will end up basing your application around streams it is a really good idea to know how streams work. With that in mind, here is an excerpt from the book.
So, today kind of got away from me and I was trying to think of what I could do to salvage this day when I came across an idea that I have had in the past. As you all probably know, Zend has salespeople. Those sales people have sales engineers who show how to use our products. However, I personally hate being on the phone for a canned presentation when all I really want to do is tinker. So, in an effort to produce something of benefit today I decided to start a series of blog posts on how to evaluate Zend Server if you are a tinkerer, like me.
The chapter on Character Encoding was probably my favorite chapter to write. I hadn’t even submitted it as a chapter in my initial book proposal. Then I was at a customer site who was having some issues with UTF-8 and they asked me if I knew UTF-8. I said yes, and I was right. However, as I examined their problem I found that I knew less than I thought I did. Then I realized that while this 3.5-year PHP consultant knew Unicode, UTF-8, character encodings such as ISO-8859-1 or ISO-8859-7, I didn’t understand them as well as I thought I had. With that I threw this chapter in the book. Knowing about character encoding is what many developers have. Not as many truly understand it. In this chapter I try to de-mystify character encoding as a whole. In other words, it’s not something that messes up how your web pages look, but rather, it is a tool for you to use to make your site available. With this chapter you will learn the history of character encodings and why they’re so messed up. Additionally, you will learn how UTF-8 actually works and how it’s related to Unicode (it’s not the same thing).
PHP developers know text really, really well. We can write SQL, we can build HTML, we can work with XML. But computers don’t speak in terms of structured text markup, they speak in terms of bytes. And while there are many PHP developers who can speak at the lower level of bytes and bits and stuch, there are many more that have difficulty there. This chapter is here to help the developers who are not as familiar with communicating directly over the wire. This is a short excerpt from a very long chapter on Binary Protocols.
I am stupid busy right now. Between normal work, adoption (moreso the stupid state requirements), preparing for 3 user group meetings and 6 hours of speaking at OSI Days in India, working on the back yard, writing Flash/Flex articles and recording an album I really don’t have much time to get a whole lot done. I’ve got some really cool stuff as part of my normal work for the cloud that’s coming out, but getting that done has proven to be a challenge.
So, last year I wrote a book. This year it’s being released and is, in fact, almost out! Very exciting! It’s called “You want to do WHAT with PHP?” You will not find another book on the market like it. Mostly because other PHP authors are not as crazy as I am. Have you ever wondered if you could access a raw Linux ext2 file system in PHP? You will have the answer. Do you want to know how to scale your website that depends on long running requests? You’ll get that answer. Have you wondered why UTF-8 is so freaking annoying? You will understand it. If you wanted to read the funniest acknowledgments ever written for a technical book? You get it with this book.
Earlier today I had asked on the Zend Facebook page “what is your favorite page for getting PHP-based information?”ÃÂ There were some good answers there so I figured that I would post those answers here (since it’s all public information anyways).
Just a quickie. Do you ever want to debug an RPC call to XML-RPC or Soap or something like that using Zend Studio/PDT and the Zend Debugger? What I mean is debug the RPC call, not the request making the RPC call. Doing that is actually quite simple. I have some code here to share that I recently (as in 5 minutes ago, used).
Zend has recently teamed up with several of the top people in the PHP community to offer the PHP 5.3 Certification. It will be coming out in a few months, but before we can do that we need beta testers. That means YOU! If you want to participate all you need to do is fill out a quick qualification survey. Everyone who takes the survey can take the final certification at a discounted rate! Even if you aren’t chosen for the beta! These are the questions you will be asked (fill them out on the link, not on this page).