Upgrading
to PHP 5 by Adam Trachtenberg, ISBN: 0-596-00636-5
Reviewed
by: Paul Schneider, Ph.D., August 2004, send
e-mail
Published
by: O’Reilly, go
to the web site
Requires: PHP
5 (any version)
MSRP: US$29.95,
CAN$43.95, UK£20.95
PHP 5.0
is the latest version of PHP, a popular open source
web programming language. Oddly enough
it comes at about the same time as the latest release
of the 4x series, 4.3. PHP 5.0 was designed to be
a major break from previous PHP versions and to help
the language to reach the next level in programming.
To assist PHP programmers with this transition O’Reilly
has released Upgrading to PHP which focuses solely
on what is new in PHP.
The Galapagos
tortoises grace the cover of this O’Reilly book. One interesting aspect of this
species of tortoises is that they are the largest
of their kind, measuring 6 feet head to tail and
weighing up to 500 pounds. The target audience of
this book is a bit like these tortoises. No—they
are not slow! The folks who will make the most of
this audience are the proverbially 100lb gorillas
of their world. In other words, this book is for
those folks who live and breathe PHP. Beginners and
dabblers will probably want to look elsewhere to
something such as Learning PHP 5.
Advanced and intermediate texts have certain advantages
and one of them is that they usually take no time
in getting to the meat of the subject without insulting
your experience level. Upgrading to PHP 5 is successful
in this aspect. Although some PHP beginners might
find some of the topics presented easy enough to
digest, most of the topics are quite advanced and
assume a level of knowledge beyond typical beginner
and intermediate level programmers.
Topics
covered include an Introduction which addresses
the question “Why PHP 5?” along with
a nice overview followed by chapters on Object-Oriented
Programming, MySQL, SQLite, XML, Iterators and SPL,
Error Handling and Debugging, Streams, Wrappers and
Filters and Other Extensions. Upgrading to PHP 5
wraps up with a chapter on applying the different
principles covered in the text by trying to touch
on each of them through the development of a simple
address book—"simple" obviously being
a relative term! In addition to the main topics there
is a nice introduction to XML, information about
additional minor changes to PHP and a section on
how to install PHP 5 alongside PHP 4. |
|
The overall
tone of the book is one of a senior programmer showing
you the ropes. You’ll find several “you’s” and “What’s
cool” throughout the text. The tone helps to make
the text a bit more personal, but at the same time it doesn’t
get caught up in jargon and makes sure that each explanation
remains clear. Along with the text descriptions, there
is usually one example of the target concept which is occasionally
coupled with examples that build on the previously presented
items.
Although the
book assumes you know PHP well, there are changes such
as Object Oriented Programming (OOP) in PHP
5 that are almost completely new to the language. In the
case of this topic, author Adam Trachtenberg does pause
to give the reader a nice concise introduction to the concept
of OOP and how it can be used effectively. That being said,
if you’ve never even thought about using OOP you
might struggle a bit in the actual application of some
of the concepts presented.
The final chapter attempts to pull the various concepts
together into a single project. This is a bit harder than
one might imagine, but overall the choices for using each
of the new features is appropriate and logical. Whether
each choice would be the best one in a real world situation
might be debatable, but as a teaching example the project
performs its function well.
Upgrading to PHP 5 is pretty solid, but it is not light
reading. The style of the book falls between a reference
and instructional approach which is probably just about
right for its audience. Readers that have experience in
the topics covered will probably benefit most from this
book and find it to be a good match. Each concept, OOP
included, is treated with an assumption of a strong core
level understanding and regular use of PHP. If you are
a PHP programmer then this text will probably hit the mark,
giving you the jump on PHP 5 you need without wasting your
time covering the stuff you already know.
Letters to the Editor are welcome and occasionally abused in public. Send e-mail to: whine@kickstartnews.com
|
|