DeShong.net
So, after attending Sara Golemon, Wez Furlong, and Marcus Boerger’s talk on Extending PHP at ZendCon 2007, I’m inspired to do something with PECL extensions. That is, takeover maintenance of one, or write one from the ground up. I spent the entire flight home “porting” (if you can call it that!) some things from our Schematic library to “extensions.” That is, I wrote some basic methods in a class…and it compiled! And it worked from Userland code, too!
If you’ve ever used PDO and want to use persistent connections, here’s a tip: You must set PDO::ATTR_PERSISTENT => true in the array of options you pass to the PDO constructor!
If you call $pdo->setAttribute(PDO::ATTR_PERSISTENT, true) after the instantiation of the object, you won’t be using persistent connections.
To illustrate, here’s the correct way to use it:
$pdo = new PDO( 'oci:dbname=foo', 'username', 'password', array(PDO::ATTR\_PERSISTENT => true)); Now, this makes perfect sense, but it’s not specifically called out in documentation. Granted, yes, the example here shows it being used in the constructor, but setAttribute() isn’t too chatty if you violate the unwritten “rules” of PDO. Only once you dig into the source code will you be able to figure this out (by virtue of the fact that the ATTR_PERSISTENT handling is only performed in the ctor!).
When my wife and I decided we wanted to carve pumpkins this year, I figured I’d try my hand at something a little more intricate…the PHPumpkin!
Yes, that’s the PHP logo carved into a pumpkin. About two hours of hard work by yours truly, Brian DeShong.
More photos here!
On October 10, 2007, I spoke at the Zend PHP Conference on “The Grown-Up Company’s Guide to Development”. This particular talk focused on the introduction of coding standards and code reviews, along with using development tools and adopting a framework/toolkit and writing your own toolkit. Grab a PDF of the slides
On October 9, 2007, Ben Ramsey and I spoke on how we used Zend Framework in building Nokia MOSH at Schematic. I also touched on some of the architectural details as well. The talk went great! A link to a PDF of the slides is below:
Grab a PDF of the slides