Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
PHP Books Media Programming Book Reviews

Core PHP Programming 223

honestpuck writes "One of my key concerns when reviewing a good book is the pull between information density and a light, easily read style. I believe that as we get further along the learning curve we can sacrifice some readability for density -- we want more facts and less explanation." Read on for honestpuck's take on the third edition of Core PHP Programming to see how well it achieves that balance.
Core PHP Programming (3rd Edition)
author Leon Atkinson with Zeev Juraski
pages 1041
publisher Prentice Hall PTR
rating 9
reviewer Tony Williams
ISBN 0130463469
summary Good comprehensive guide for beginner to expert

The authors of Core PHP Programming have found a marvelous middle ground. Toward the beginning of the book they have a great deal of light, explanatory material as they cover the basics of PHP. As they move towards more advanced topics there is less explanation and a tighter packing of information. At the same time the book has a large number of small code examples throughout, making sure that you know how to use the functions under discussion.

This is the third edition and I must admit that I had not come across it in either the first or second editions, so I have no great way of comparing them in this review. It has certainly been revised to take into account the changes for PHP 5 and examining the table of contents for the second edition on Safari I can see the that the basic structure has remained the same while the book has grown about 300 pages. The addition of Zeev Suraski as co-author can only be to the benefit of the quality of the information, particularly regarding PHP 5.

The book starts with the absolute rock bottom of PHP, the basic data types and operators through to efficiency, debugging and design patterns. Along the way it covers almost all aspects of PHP 5 with a readable reference style. The 'Core' in the title of this book is a key to understanding it. If you're looking for a book with all the code required to handle session management, or user logins and security (to mention two possibilities) then this isn't the book for you. If, however, you are after a book that more than adequately explains the power and nuances of PHP and programming in the language then this is a marvelous volume.

It's broken up into 5 sections: "Programming PHP," which covers the basics of data, control flow and I/O; "Functional Reference," which is 600 odd pages broken up into 12 chapters that seems to cover every PHP function (a check of three sub chapters showed every function mentioned on the topic at PHP.net was also in the book) and does it well with good explanation and code examples; "Algorithms," which details a number of methods of performing routine tasks such as sorting, parsing and generating graphics; and "Software Engineering," devoted to design, efficiency and design patterns; and finally, there are a seven excellent appendices.

Taken as a whole it does a good job of covering the whole language and the ways of using it.

I can imagine it would make a good companion volume to my other favourite PHP volume, PHP and MySQL Web Development, which tends more towards recipes and leaves out the encyclopedic coverage of this book.

Leon Atkinson has a good page for the book that includes a link to download all the code and examples, a link to the Prentice Hall page for those wanting an example chapter or a look at the Table of Contents and some other reviews. His site also has a page for the inevitable errata, currently blank. While I did find only one typo (not in example code) I can't claim to have read every page or run all the code examples.

I'd recommend this volume to anyone who wanted a comprehensive guide to PHP 5. It is probably useful at almost all levels.


You can purchase Core PHP Programming, 3rd Ed. from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

Core PHP Programming

Comments Filter:
  • Re:Needed? (Score:5, Interesting)

    by pogle ( 71293 ) on Monday January 12, 2004 @01:36PM (#7953777) Homepage
    Indeed. When I was first learning PHP and doing a lot of local testing, I just downloaded the whole doc to my PDA. Easy searching, and remembers my place even if I close the cover ;)

    I will admit I've got 2 O'Reilly books on PHP (Programming and the Cookbook) but more often than not its easier to just hop on their site and search there. The books are there to look cool with the rest of my O'Reilly collection.

    Personally I like the user comments in the online docs the best. Half the time someone's already written some small function that I'm looking for, or quite adequately explained all the various cases of some esoteric function return.
  • Re:Needed? (Score:3, Interesting)

    by heironymouscoward ( 683461 ) <[moc.oohay] [ta] [drawocsuomynorieh]> on Monday January 12, 2004 @01:43PM (#7953853) Journal
    Harkins' Law of Dead Trees: "The same people who refuse to read the copious free online searchable documentation until they come across an unsurmountable problem will rush out to spend $39.95 on a 1000-page book containing essentially the same information."
  • by Anonymous Coward on Monday January 12, 2004 @01:53PM (#7953960)
    I gotta agree with the poster above.. O'Reilly's PHP Cookbook is an excellent way to sharpen your PHP skills.

    I've recently gotten back into using PHP for medium-size sites, after a brief period of hating it. I hated the security problems, the "fake" OO, the arbitrary stuff like magic quotes, the procedural functions. However, I've changed my opinion a bit: in security, you can have the PHP engine OFF and very tight in the .ini, and then make adjustments in the httpd.conf for each customer. I.e., just let them open files in their own directories. And the OO is simple but effective enough for clear maintainable code. Throw in a PHP accellerator and you've got a great environment.

    PEAR (object-oriented extension library) is pretty cool. If you've never used it, try it out: "wget -O- http://go-pear.org/ | php -q".

    And PHP5 looks great, I love the fact that it has exceptions, interfaces, and type hints, that will pretty much kill Java on the medium/small end of the scale. So I decided to start using PHP again.

    Anyway, the only good book I've seen is the O'Reilly Cookbook. They totally missed the PHP bandwagon but they redeem themselves with this one. It's clearly written, very thorough, and includes recipes of all levels. I learned a lot about PHP just by reading through the recipes. They usually present one clear way to do everything, plus make some useful discussion on performance and security when appropriate. The authors cleary understand PHP deeply.

    And the book is pragmatic, unpretentious, and clearly designed to help you get your work done, rather than present a list of "my language is cooler than yours" tricks. Unlike certain others *cough* Python cookbook *cough*. (Granted, that's also a property of PHP itself).

    So if you've got the basics of PHP (which you can glean from the PHP web site or from studying other people's code), try the O'Reilly book. It's probably the only one you'll need until PHP5 comes out.
  • by Raven42rac ( 448205 ) * on Monday January 12, 2004 @02:07PM (#7954093)
    Four words. O'Reilly Pocket PHP Reference. [oreilly.com] This sounds like your kind of book then. It comes in terribly handy, it has a place right next to my Obj-C pocket reference.
  • by whitelabrat ( 469237 ) on Monday January 12, 2004 @02:16PM (#7954165)
    I pretty much started out my programming career on the hot-off-the-press Core PHP book. The online documentation is good as a reference, but for someone getting started Core PHP is well balanced enough so the reader doesn't get crushed by details.

    Wore my book out...
  • by waxmop ( 195319 ) <waxmop@overlook. ... t ['nux' in gap]> on Monday January 12, 2004 @02:18PM (#7954178)
    PHP appealed to a lot of people because it was very simple and had limited syntax and didn't implement a lot of complicated data types. PHP was the kind of thing a non-programmer could learn in an afternoon. You didn't need to explain regular expressions, object-oriented design, or pointers/references. PHP originally just had loops, conditional statements, simple functions, and include statements.

    But every version has added on more features. Now instead of a smooth and light templating language, people are now writing templating languages to be parsed by PHP. Gahh! The proper response to all the trolls that insult PHP by saying that it isn't a real language is not "Wait until version 5! It supports class introspection!" Instead, the PHP community should have said that PHP wasn't meant to be a "real" language.

    Now that PHP requires a 1000-page book, why should it exist? Why not use Perl, or Python, or C?

    I will say that the PHP community is a very friendly and helpful group of people. Perhaps that is because so many PHP developers were previously graphic designers, and so they still remember how daunting programming can be to learn.

  • by tomstdenis ( 446163 ) <tomstdenis@gmGINSBERGail.com minus poet> on Monday January 12, 2004 @02:23PM (#7954230) Homepage
    Not much wrong with PHP. That wasn't my point. It's just every jackass who copies the function reference guide for [language of the week] then tacks on 400 pages of "this is what an if statement is" does not a good book make.

    If you want to learn comp.sci there are better books then some jackass reference manual for a programing language.

    In reality you could put the PHP grammar on a few pages or so [the C one takes like 4-5 pages in the K&R book] then proceed to show off examples of PHP being used for practical purposes [e.g. accessing mysql, accepting files, etc, etc].

    Tom
  • by tolan-b ( 230077 ) on Monday January 12, 2004 @02:23PM (#7954232)
    It covers everything in the PHP5 spec up to about a month and a half ago I think. Had to have a peek inside though, because the cover says it covers 4.x, which is clearly a misprint because it's got all the new OO stuff, SQL Lite and simpleXML stuff in there.

    on amazon. [amazon.com]
  • Re:Needed? (Score:2, Interesting)

    by the_duke_of_hazzard ( 603473 ) on Monday January 12, 2004 @02:23PM (#7954245)
    I had an argument today with someone who mocked me for printing out an email and scribbling my responses to the points before typing them up.

    I pointed out that a pen and paper have a very high resolution indeed compared to a monitor and the gui is very flexible and quick.

    Similarly, a book is easier on the eyes, very portable, well-indexed, has a consistent format and quality and probably has been better-edited.

  • by mgkimsal2 ( 200677 ) on Monday January 12, 2004 @02:35PM (#7954385) Homepage
    You're correct on the breaking stuff. What our problem has been is that generally the stuff that breaks doesn't even make it into the online manual. I'm still peeved at the way most changes are handled in PHP - they seem to have no concept of the fact that *millions* of people are affected by their actions, and carry on as if they were just hacking in their basement.
  • Good book but... (Score:4, Interesting)

    by 2Wrongs ( 627651 ) on Monday January 12, 2004 @02:45PM (#7954489)
    I used this book as my intro to PHP (I've done several other languages). Overall the book was good, but I had some problems:

    1) I loved the objected oriented aspects, but was disheartened to learn most of that code only applies to the latest PHP, which isn't deployed in most ISPs.

    2) The index is terrible. Thank God the online docs are good. I've rarely been able to use the book as a reference.

    3) I'm probably being dense, but I had trouble finding the sample code online. I expected it on Prentice Hall's website or at least an obvious link. (It's on the author's site)

    I'm whining, but I really did like this book and would still recommend it.

  • by Laconian ( 578463 ) on Monday January 12, 2004 @02:53PM (#7954576)
    PHP seems to attract everybody under the sun--including horrible, horrible programmers. I've had to maintain PHP written by someone else before, and it wasn't pretty. Far from being pretty, it was some of the ugliest code I've ever seen. And when I looked for help on forums with certain problems I ran into, the responses I received were oftentimes truly amateur hackery.

    That's probably why PHP has a bad name. That and magic quotes.
  • I actually reviewed this book for PHP Magazine [www.php-mag.net] in October.
    It's supposed to be published in one of the next few issues.

    This book is terrible -- If I were to give it a slashdot review rating -- it would be *3* and that is being generous.

    Below is the hyperlink to my review:
    http://www.wizardtechnologies.net/reviews/phpmag-c pp.html [wizardtechnologies.net]

Your computer account is overdrawn. Please reauthorize.

Working...