specializing in digital media technologies

Digital Media and Communications Insights, Inc.


Larry Ullman's Blog

My Forthcoming E-Commerce Book, Rough Table of Contents

I am very pleased to say that I’ve just finished the rough draft of the Table of Contents for my forthcoming “E-Commerce with PHP and MySQL” book, to be published by New Riders Fall 2010. I’ve been wanting to do this book for some time (and was supposed to do it last year) and readers have been asking for it for even longer, so I’m really excited to get going on it finally. (continue reading…)

Filed under: MySQL,PHP,Web Development — Tags: ,

Email Validation in PHP

A very common need in PHP-based Web applications is to validate email addresses. An email address, at its most basic contains the @ and a dot and no spaces or special characters, so it’s pretty easy coming up with a regular expression that will fit this most simple restriction. However, if you want a full-on precise regular expression, that takes an immense amount of code (the full email validation pattern takes up almost a page of code). An alternative, then is to use the EmailAddressValidation class, created by Added Bytes and now hosted on Google Code.

After you’ve downloaded the code and put it on your server, you use it like so:

require('/path/to/EmailAddressValidator.php');
$emailValidator = new EmailAddressValidator();
if ($emailValidator->check_email_address('test@example.org')) {
    // Email address is technically valid.
} else {
    // Email not valid.
}
Filed under: PHP — Tags:

The Death of PHP 6/The Future of PHP 6

About two months ago, Johannes Schlüter posted about the Future of PHP 6. Schlüter works for MySQL (and therefore Oracle-Sun) and is an active and involved member of the PHP team. In his post, Schlüter discusses the difficult choices facing PHP with respect to the intended version 6 and its support for Unicode. In turns out that changing all of PHP to support Unicode isn’t as easy as one would have thought. And, of course, it was originally considered to be, well, hard. Apparently, this struggle is the reason PHP 6 is still nowhere to be found (in fact, the source code has slowly been disappearing from PHP’s snaps site). So now, the PHP team is regrouping in order to go forward and we’re not exactly sure when or how Unicode support will be integrated into PHP, or how this change affects the next few versions of PHP, both minor (i.e., 5.3) and major (6 and 7).

As a person that wrote a book on PHP 6 quite some time ago, and has looked more and more silly over time, I’m happy to hear this news, even if we don’t yet know what the end result will be. Granted, most of that book uses PHP 5 and PHP 6 (the version that was available when I wrote it) is only required by like 5-10% of the material, but still…lesson learned on my part: especially when it comes to open source software, there’s just no predicting what’s going to happen next. So, for the time being, let’s be happy with the PHP we have and keep an eye on where the development team goes with this. I know I sure will!

Filed under: PHP — Tags:



If you have a question, are seeking information, want to download files, or generally have any need related to a specific book, please make sure you are using the correct link. Check both the title and the edition.