Programming PHP, Second Edition
Creating Dynamic Web Pages
By Kevin Tatroe, Rasmus Lerdorf, Peter MacIntyre
April 2006
Pages: 540
ISBN 10: 0-596-00681-0 |
ISBN 13: 9780596006815




(4) (Average of 3 Customer Reviews)


Description
As the industry standard book on PHP, all of the essentials are covered in a clear and concise manner. Language syntax and programming techniques are coupled with numerous examples that illustrate both correct usage and common idioms. With style tips and practical programming advice, this book will help you become not just a PHP programmer, but a good PHP programmer. Programming PHP, 2nd Edition, covers everything you need to know to create effective web applications with PHP.
Full Description
Programming PHP, 2nd Edition, is the authoritative guide to PHP 5 and is filled with the unique knowledge of the creator of PHP (Rasmus Lerdorf) and other PHP experts. When it comes to creating websites, the PHP scripting language is truly a red-hot property. In fact, PHP is currently used on more than 19 million websites, surpassing Microsoft's ASP .NET technology in popularity. Programmers love its flexibility and speed; designers love its accessibility and convenience.
As the industry standard book on PHP, all of the essentials are covered in a clear and concise manner. Language syntax and programming techniques are coupled with numerous examples that illustrate both correct usage and common idioms. With style tips and practical programming advice, this book will help you become not just a PHP programmer, but a good PHP programmer. Programming PHP, Second Edition covers everything you need to know to create effective web applications with PHP. Contents include:
- Detailed information on the basics of the PHP language, including data types, variables, operators, and flow control statements
- Chapters outlining the basics of functions, strings, arrays, and objects
- Coverage of common PHP web application techniques, such as form processing and validation, session tracking, and cookies
- Material on interacting with relational databases, such as MySQL and Oracle, using the database-independent PEAR DB library and the new PDO Library
- Chapters that show you how to generate dynamic images, create PDF files, and parse XML files with PHP
- Advanced topics, such as creating secure scripts, error handling, performance tuning, and writing your own C language extensions to PHP
- A handy quick reference to all the core functions in PHP and all the standard extensions that ship with PHP
Praise for the first edition:
"If you are just getting into the dynamic Web development world or you
are considering migrating from another dynamic web product to PHP, Programming PHP is the book of choice to get you up, running, and productive in a short time."
--Peter MacIntrye, eWeek
"I think this is a great book for programmers who want to start developing dynamic websites with PHP. It gives a detailed overview of PHP, lots of valuable tips, and a good sense of PHP's strengths."
--David Dooling, Slashdot.org
Featured customer reviews

Definitely A Good Begginers Book.,
March 09 2009
Submitted by
Andrés (Vermillion)
[
Respond |
View]
After searching non-stop for tutorials on the internet about PHP, with no avail, or should I clarify, without finding any good tutorial on the internet, I decided to look up for a book that will help me learn PHP easily and without too many problems. "Programming PHP: Second Edition" is the first book that I found and definitely called my attention (not the animal on the cover... But that's definitely another story for another time).
So I traveled to the US and I found this book on the US, as I couldn't import it due to the lack of a credit card. I started to read it, and it made things very simple. It teaches you the syntax, and the core features of the language in a concise and clear way.
Although, like everyone trying to learn anything, needed or not, I did find some rocks on the field while trying to learn with this book, and unfortunately, the book didn't help me solve many of the problems I found. For instance, I could never use the graphics library for PHP because it seems I didn't have it installed back in that time, and the book does mention some weird command line stuff, but unfortunately, not everyone has a lot of knowledge on Command Lines. Personally I am illiterate when it comes to Command Lines, specially the Linux one (which is the one I believe the book shows you)... But come on! I am pretty sure a lot of the people that bought this book didn't even know what Linux was. It could have tough you a bit more about command line compiling for the PHP libraries you can get, and about the Linux Command Line. It definitely would have been a small yet useful knowledge.
This book also covers the main pillars of OOP (Object Oriented Programming), and I have to say I am very satisfied for this, as with this pillars I actually did well when I saw OOP in C++. But after a while, I noticed the OOP part was not completed in a way, and considering the fact OOP is a first time complex concept for new programmers, they should have talked more about OOP and they should have given more examples regarding classes and objects/instantiation. Deeper coverage on abstraction and Polymorphism could have been very nice too.
It covers the use of databases too, but for some reason they didn't mention MySQL at all, which is the most used Database system for PHP if I am not mistaken...
Never the less, while it has its complex moments, and the OOP part is sort of incomplete, no one I know really takes a deep look at OOP the first time they see the concept. And even though the Database concepts are not really well covered, there are other books dedicated to that. The book still covers its main purpose of teaching PHP and the main features, and the syntax of course.
I recommend this book to anyone that is interested in learning PHP and (probably) about the compatible databases with PHP. Though I recommend you use this book for PHP and just for PHP. The whole Databases part deals with objects and OOP, and not all of it is covered in the book.
Re: A comment about the style,
November 17 2008
Submitted by
cambridge
[
Respond |
View]
its simple only create a typical php file and then you see that the code sample is a simple code:
< ?
function update_counter () {
static $counter = 0;
$counter++;
echo "Static counter is now $counter\n";
}
$counter = 10;
update_counter();
update_counter();
echo "Global counter is $counter\n";
? >
This results in
you will see the output:
Static counter is now 1
Static counter is now 2
Global counter is 10
The simple code expect the knowledge of the simpliest way of computing: code and output
The fully simple knowledge is: input - code - output
Exercises Needed,
September 15 2008
Submitted by
Cezar El-Nazli
[
Respond |
View]
I haven't made the purchase yet, but looking at the
Table of Contents, I can think of two things:
First of all, the book is very detailed, but the lack of exercises is a curse. I had to buy both the Learning PHP5 (http://oreilly.com/catalog/9780596005603/index.html) and Programming PHP, because the first one has exercises.
I'll come back with a proper review, after reading and understanding the book(s).
Read all reviews
A comment about the style,
April 28 2008
Submitted by
Doug Lerner
[
Respond |
View]
I am still just reading it. It seems like a useful book, but not as comprehensive, orderly and error-free as my O'Reilly "JavaScript" book is. Maybe the language itself is not as orderly. But it seems there are a lot of language notations that are used before being defined in a later chapter.
I am still working my way through it and may come back and increase my rating of it later on (if possible), but for now I wanted to just mention one really
annoying style matter that makes the code samples hard to read (and is the reason I decided to pause and write a review).
This is a typic code sample (I bought the PDF version of the book):
function update_counter () {
static $counter = 0;
$counter++;
echo "Static counter is now $counter\n";
}
$counter = 10;
update_counter();
update_counter();
echo "Global counter is $counter\n";
Static counter is now 1
Static counter is now 2
Global counter is 10
The last three lines are the result of running the code above it. Could that not be distinguished
somehow? Could there not be a separator between the code and the results? Or could not a different type style be used? Or even add a line break and say "This results in:" or something like that?
All the samples run the code and results together which make them difficult to read. I was surprised a format like that would be used.
doug
a must have PHP book,
February 14 2007
Submitted by Anonymous Reader [
Respond |
View]
Programming PHP is an excellent book on PHP (a weak typed scripting language that mixes presentation and code). The book contains several small mistakes in the code examples. A big plus is chapter 12 which talks about security. Bravo! Overall, a must have O'Reilly title.
Media reviews
"If you expect to only buy one book on PHP ever then this may just be the one that you are looking for."
-- Stephen Chapman,
Fellgall.com
"Co-written by the guy who invented PHP (Rasmus Lerdorf,) this is a must-buy book for anyone getting into PHP or web programming in general. The book does not try to cover everything about PHP
instead it gives the best coverage of the core language Ive ever read. Buy the book."
-- Stefan Mischook,
KillerPHP.com
"In 521 pages, the book covers a lot of ground and as someone who did read it from end to end, I found it readable and useful. That's a neat trick when it comes to a language such as PHP, which can be used in so many ways...In an age where PHP usage seems to always be on the increase, it's probably a good idea to have such a well-rounded reference around."
-- Taran Rampersad,
KnowProSE.com
Read all reviews