PHP Conference, day 1

Monday May 2 2005

Conference logo
Today was the first day of the PHP Conference in Amsterdam. I attended the highly interesting full-day session by Laura Thomson and Luke Welling on and best practices. It turned out to be an excellent choice. Thanks to this presentation I've 'discovered' the really cool mysqli extension that harnesses the full power of MySQL 4.1 under PHP5. In fact my hands were itching to try it out when I got home. The OO interface really shines. If you haven't checked it out yet you definitely should! I planned to write more about today than you'll find when you click the more-link but unfortunately the presentation they gave isn't yet available online yet and I didn't take my own notes. (stupid!). I'll dive into some of the more interesting issues in more depth when I've toyed around with them a bit more. For now just some random notes on the session.

Dark Matter Pro: a premium photoblog template.

Affiliate program available

A lot of PHP5 was covered as well. It made me realize that it's kind of pointless to go and get Zend Certified right now since the test is still based on PHP4. I hope PHP4's days will be over soon. It needs to die, period. A funny example was given on how much PHP4's OO implementation actually sucks:




This piece of code actually creates THREE (!) objects due to the pass-by-value characteristics of PHP4. The first two objects are created when we instantiate a someClass object. One is $a and one is wel ehm... immediately lost, but created nevertheless. When we assign $a to $b yet another copy is created. Thank god for pass-by-reference in PHP5, like it should. Bye bye PHP4, rest in peace. Let's hope Zend will hurry with the PHP5 certification program.

Did I mention mysqli is really cool? Especially the prepared statements are simply awesome.

A nice example from the php manual:


prepare("SELECT District FROM City WHERE Name=?")) { /* bind parameters for markers */ $stmt->bind_param("s", $city); /* execute query */ $stmt->execute(); /* bind result variables */ $stmt->bind_result($district); /* fetch value */ $stmt->fetch(); printf("%s is in district %s\n", $city, $district); /* close statement */ $stmt->close(); } /* close connection */ $mysqli->close(); ?>

Just lovely! The prepared statement functionality can dramatically speed up long series of the same query since it's only sent to the database once and then run many times. An added bonus is the very nice protection against SQL injection. Definitely worth a look.

In the afternoon a lot of powerful features of MySQL 4.1 and 5.0 were discussed. I've seen it's about time I caught up with stuff like the transactions, query cache, more on prepared statements, subqueries and many other excellent features. The presentation by Laura and Luke will be online in downloadable format in a couple of days. I'll update this posting when it becomes available!

Tomorrow I plan to bring my powerbook to the conference and I'll try to do some blog post directly from the . Stay tuned!
bookmarking

Commentary

Join the discussion! Leave a comment through the comment form below!

Got something to add to this?

Feel free to leave a comment on this site. You can use Textile and Emoticons. Your email address is only used to show a gravatar. Please stay on-topic and use common decency. Spammers will be shot in front of a live studio audience.

If you plan on posting code, use pastebin please and post a URL to the code. The comment processing doesn't deal very well with code. Sorry for the inconvenience.

Human comment spammers: don't bother posting your crap here. Comments are moderated and I won't let any of your shit through.

Remember personal info?
Yes
No

Trackbacks

If you have an interesting related post on your own site you can leave a trackback. As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once.

 

  • Featured Links
RockySomewhere near the Orion NebulaBookalicio.usGolden Gate BridgeThames River BankJackie and mePimpin' it