Learning PHP 5
By David Sklar
First Edition June 2004
ISBN: 0-596-00560-1
368 pages, $29.95 US, $43.95 CA, £20.95 UK
Rating: Good. :) :) :) of 5
PHP is a server side scripting language that makes it much easier to build dynamic websites.
This book begins with a very good, easy to read introduction to the fundamentals of PHP. It then covers a number of more advanced topics where the going is rougher.
The book is a very good introduction to PHP. That's true even if what you have available to you is PHP 4. That's because most of what you'll learn in the book will work on PHP 4 or PHP 5 and because it's clearly indicated which features are PHP 5 specific.
While this book is a good introduction to PHP, it is not a good introduction to the new features in PHP 5.
If you want more, you could check out my somewhat longer review.
This book is on Safari Tech Books Online. In fact, I read all the chapters of the book on Safari before I got the dead tree version.
See my review of "Programming PHP" for some more on online resources. (Look in the left column under Online Watch.)
PHP stands for "PHP: Hypertext Preprocessor". ;-)
PHP
There have been several versions of PHP. The versions you definitely need to be aware of are PHP 4 and PHP 5.
PHP 4: PHP 4
PHP 5: PHP 5
databases: I've done very little with databases.
O'Reilly: I own many O'Reilly books. I am generally quite satisfied with them. I'm a fan of O'Reilly.
Perl: I've been using Perl since 1994. My favorite language by far is Perl. Over the years, I've written a number of Perl CGIs.
PHP: I've only recently started to use PHP and have only used it a little. Try Random Geek Fun which I created using PHP. :)
I have read and reviewed two books on PHP 4.
My domain supports PHP 4 but not PHP 5. However, I have PHP 5 on one of my machines at home.
Webmaster: I've developed a number of websites and am currently the webmaster of several non-profit sites. However, I am definitely not a professional webmaster.
Title: Based on the title, I expected an introduction to PHP 5.
Cover: The cover, in addition to the title, includes the words "A Pain-Free Introduction to Building Interactive Websites". Based on those words I expected the introduction
Preface: Based on the preface, I expected that the prerequisites were just that the reader
What I Hoped: Personally, I hoped and expected that
An Introduction to PHP 5: This is certainly an introduction to PHP and to PHP 5 in particular.
I'd say that's already true after the first 5 chapters.
Preparation for Building Dynamic Websites:
By "dynamic" here I mean pages that are are returned differently from the server without anyone recoding them.
In this sense of dynamic, PHP is designed for building dynamic websites. Most everything in the book is relevant to that. This is particularly apparent in the following chapters
Not Unusually Easy to Follow: However, I wouldn't say the book was unusually easy to follow after the first five chapters which cover the basics of the language.
Few Prerequisites: I think the stated prerequisites are correct.
My Hopes: All my hopes for the book were satisfied. (For what my hopes were, see above under What I Hoped under "What I Expected" above.)
OK, what I especially liked follows.
Chapters 1-5: I thought the first five chapters were quite good. They are really easy to follow, and they (especially in the first chapter) contain much useful perspective.
Learned Things: Although I had some degree of familiarity with PHP 4, I definitely learned some things about PHP 5. For example
References: I particularly appreciated the references, and, especially, the references to the online PHP manual. IMO, the online manual is too long and too thorough to serve as an introduction. However, it's ideal for when I wish to go deeper; the explanations are clear and I really find the comments after sections quite useful.
Interactive?: The cover indicates the book is an introduction to "Building Interactive Web Sites". This is true, but might be misunderstood.
PHP (by itself) can't consistently provide the intense interaction that client-side JavaScript and Java applets can. Well, not until everyone has a blazingly fast connection to the Internet and the Internet stops hiccuping from time to time.
Chapters 6-13: After the first 5 chapters, I thought many of the chapters were tedious. I didn't think they were "Pain-Free" as advertised.
Please note, I'm not saying that these chapters are unreasonably hard. I am saying I think many readers would not find these chapters "Pain-Free".
HTML Reference for Beginners: The O'Reilly Definitive Guide for HTML and XHTML is recommended for those missing the HTML prerequisite. I think this is a bad recommendation because it goes into much more detail than is necessary to supply the prerequisite. Hey, it's 670 pages long.
Mail HTML: The example of mail includes HTML. Personally, I think HTML should be avoided in mail.
I'm well aware that not everyone feels that way.
Lack of Humor: I don't recall laughing or chuckling even once while reading the book. :( Some lightness would have been appreciated, especially in chapters 6-13.
Effect of PHP Tags: A statement in the first chapter seems to say that whatever is outside PHP tags is printed as is. This is not always the case and some of the cases where it is not are IMO important. I thought the chapter on Making Decisions would clarify this but it did not.
This book would be good for someone
Some reasons for not getting this book might be
Is this book for you? I'm not sure. How people learn varies from person to person. This is particularly important when learning something new.
This book is a good introduction to PHP. It does a very good job of introducing the fundamentals of the language. But since people learn so differently, I suggest checking this book out at your local technical bookstore if you can.