PHP6 to PHP5.4

January 10, 2012

In early 2012, the official release of PHP5.4 is expected (it’s currently in its fourth release candidate stage). PHP5.4 completes many of the additions that were planned for PHP6 (several others, such as namespaces, were added in PHP5.3). Along with the additions, many of the features that have been deprecated in PHP and were set to be removed in version 6.0 are now being removed in 5.4 instead, such as PHP’s Safe Mode.

The main reason I wanted to use PHP6 when I wrote the third edition of my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” book is the intended support for Unicode. I had not seen this before, but I guess the attempted move to Unicode resulted in PHP scripts requiring twice as much memory as before, with a noticeable lag in performance. This is why the developers had to scrap those plans. But PHP 5.4 has “inline support” for several new languages, including Japanese and some dialects of Chinese. In other words, PHP5.4 has kind of a Unicode-light support. This Unicode support won’t be activated unless specified during the installation process.

I’m not sure where this leaves actual PHP6, but PHP5 is certainly a most excellent tool in its own right. I did use PHP5.3 in the fourth edition of my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” book, and will make use of PHP5.4 in the third edition of my “PHP 5 Advanced: Visual QuickPro Guide”, due out later this year.

 

In this edition…

Continue Reading…

Newsletter Opinion Poll

January 6, 2012

Historically, the [intlink id=”1564″ type=”page”]newsletter[/intlink] has gone out every 3-4 weeks, and is around 3,000 words long (that’s my target). I’m debating switching the newsletter’s schedule to every two weeks. If I were to do this, I’d likely cut the length by about half. I’d also change a couple of other things about the regular content: probably drop the “About This Newsletter” section and alternate what other sections are used, for starters. What do you think?

Please use the poll below to vote. If you have any specific comments, please post them using the comments form. Thanks for your input and for your interest in what I do!

[poll id=”2″]

I’ve never been much of a New Year’s Resolution person: if something is important enough to do, start today, not on some arbitrary date that happens to be the first day of the year. (Or, you know, January 2nd, because the first is a holiday and all.) But this year I happen to have quite a long non-resolutions list. The timing is entirely coincidental: I just happen to be almost done with my Modern JavaScript: Develop and Design book, and I always have a long list of things to do between books. I only have two more chapters to write on this book, and the end is in site!

In a recent newsletter, I answered a question about how I spend my time between projects. For me, the biggest projects I have, in terms of stress and time consumption, are the books I write. The client projects–Web development and such, no matter how big or complicated, never seem to be that much of a burden. Mostly this is because I find programming to be much easier than writing about programming, and because it’s fun to make things happen, to implement new concepts. Over the course of a year, I’ll work on any number of projects, ranging from consulting a couple of hours here or there (i.e., helping to steer the actual developers) to doing all of the development myself. When these bigger projects are done, I’m pleased to have them off of my list, but there’s never the huge sigh of relief that I have when I’ve finished a book. And that sigh says: now I can do these other 20 things that have been waiting for me!

With the completion of the JavaScript book on the horizon, I’ve been making my January to-do list, and salivating over all the things I’ll be getting done. Certainly, what I will actually do won’t be nearly as long as this list, but one can dream, no? My next deadline isn’t until this summer, which is when I have to turn in the third edition of my PHP 5 Advanced: Visual QuickPro Guide book. Although I’d like to, for a change, get that book done well in advance! Still, I have a bit of time to really put a dent in my “someday” to-do list.

First on my list is to exercise more often. I feel like I’ve gained five pounds for every book I’ve written (all that sitting), and while I’ve exercised more than never over the past few months, I’d like to do much, much better. We could all probably use more exercise!

After exercise, which is a daily and on-going goal, I’ve grouped my dream tasks into four categories:

  • Things to work on
  • Books to read
  • Work things I really should get done
  • Personal things I really should get done

The last category is of little interest to you, I imagine, or wouldn’t mean much regardless (mostly construction projects around the house). The work things I really should get done are those things that don’t get done during my books and big projects. For January, this primarily means creating an HTML5 version of this site’s design, plus a corresponding version for my forum. Before I redid this site in October of 2010, the site had become woefully outdated and I want to insure that doesn’t happen again. If time allows, I’ll do a mobile version, too, and make sure everything is performing as well as can be.

The books to read are both personal and work related. I want to read one or two parenting books, a novel, and some work-related books. I’m specifically looking to read The Pragmatic Programmer by Hunt and Thomas first. I’ve heard good things about it. Then, coincidentally, I have a couple of ebooks from The Pragmatic Bookshelf on my computer awaiting a few moments of time. As I read these, I’ll no doubt be posting my thoughts about them here.

Finally, there’s my “things to work on” category, which is a broad category of topics without definitive targets or concrete tasks. Normally these items are a matter of improving my skills in specific areas. Right now I’m thinking honing my abilities and knowledge with respect to Launchbar and TextMate, two Mac apps I use all the time. I know for a fact that I’m underutilizing both. The time I spend improving my skills with them now will pay dividends over the rest of the year. As time allows, I also plan on continuing to write my Yii book, although I’ll probably do that as blog posts, too.

So there are my January 2012 non-resolutions. Which will likely also be my February 2012 non-resolutions. Sadly, at least a quarter of them will end up on my September 2012 resolutions, too!

UPDATE: I just literally finished all the work on the Modern JavaScript: Develop and Design book yesterday, so thus far, I’ve done pretty much none of the things on my list, including exercise more. Ugh. But how about that February list…

Although I don’t normally do this, per a reader request, I’ve made the book’s examples available to be seen and used here. The book has three primary examples, each in an Ajax and non-Ajax form. The pages are:

dept_form.html
This page returns all of the employees in a selected department.
add_employee.html
This page uses Ajax to add an employee to the database (note: the version running on this site does not actually execute the INSERT query that updates the database.)
search_form.html
This page provides a simple search to retrieve employees by last name.

There’s no navigation within or among the pages. You’ll need to click Back to return to this page to see another example. To run one of the examples without Ajax (to see what that’d be like for visitors that can’t use the Ajax version), disable JavaScript in your Web browser.