Tag Archives: PHP

Beware of Optional Curly Braces — They Will Bite You

I was looking through some PHP code from a third-party vendor recently, and saw something that made my jaw drop. It’s pretty innocent-looking, at first. Here’s a somewhat anonymized and genericized version of the code, but the thing that bothered me is still intact. It’s not really a bug, per se; the code will function as […]

Hummingbird Version 0.66 Released

This is largely a bug-fix release. Tom Clift, of PaperCut print management software, kindly informed me of a few installation issues that my own tests didn’t find. The profusion of configuration options in PHP can make testing everything on a single server quite difficult. This would be a good time for me to mention that […]

Announcing Hummingbird

If you read Coyote Tracks*, you’ve probably noticed that I recently set up a thing over there in the right-hand side that says “My Latest Tweets”. At first, that was just a little PHP widget that I’d hacked together myself. But then I realized it could actually be useful to other people, because it does […]

Workaround for PEAR/PECL Failure with Message “ERROR: `phpize’ failed”

When you try to upgrade or install various PEAR (or PECL) packages, you may get the rather unhelpful error message “ERROR: `phpize’ failed”. For example, here’s the result I get when I try to install the pecl_http package: root@finrod:~# pecl install pecl_http pecl/pecl_http can optionally use PHP extension "iconv" downloading pecl_http-1.6.3.tar ... Starting to download […]

Grousing About PHP’s Limitations

Drat. I would like to chase back up the class hierarchy of a bunch objects, and then do something based on the second-from-the-top of that chain. (For example, when the chain goes Word > Noun > Animal > Mammal > Human, and I’ve instantiated a Human, I’d like that object to be able to tell that it’s a Noun.) Unfortunately, […]

I’m Getting Tired of Yak-Shaving

It seems like every time I try to get around to actually writing some code, I discover yet another thing that I have to do in order to make that more possible. Today, it was: Get PHPUnit installed on Lórien, so I could run my unit tests locally during development, rather than having to shove […]