Slashdot Mirror


Programming PHP

dooling writes "Continuing the tradition of well written O'Reilly 'Programming' books by those who know the language best, Programming PHP, co-written by the creator of PHP, Rasmus Lerdorf, provides a detailed overview of the popular PHP web-page scripting language. This book provides good programmers who have never used PHP enough information to do serious web development using PHP and serves as an excellent reference for web-page designers who dabble in PHP." Read on for the rest of his review. Programming PHP author Rasmus Lerdorf & Kevin Tatroe pages 507 publisher O'Reilly and Associates rating 7 reviewer dooling ISBN 1565926102 summary great PHP book for serious programmers, good reference While not as entertaining as Programming Perl, it isn't nearly as long either (and doesn't have to be). The book is written in a straightforward style and is very well organized. Appendices provide quick reference to all the PHP built-in functions and many PHP extensions. The most popular extensions, e.g., PEAR DB (database connectivity) and XML, have entire chapters devoted to them. Can't find a PHP extension for your favorite library? There's a chapter about writing your own PHP extensions, including writing C library wrappers.

This book begins as most O'Reilly "Programming" books do: with a brief introductory chapter. In Programming PHP, this chapter is very short, so don't look to this book for a gentle introduction. On the other hand, this is the perfect book for you if you are just looking to learn a new scripting language. The following chapters go over syntax, data types, built-in functions, etc. These chapters are a little dry, but move quickly and effectively demonstrate the unique features of PHP (as compared to other scripting languages).

Of particular interest to programmers who are interested in expanding their horizons to developing dynamic web pages are the chapters on PHP web techniques, security, and application techniques. The web techniques chapter gives a quick overview of HTML and the GET and POST methods (and why you would want to use one or the other). It then covers a lot of useful tips and tricks that may be foreign to someone who has done little or no web development. Topics such as getting server information, form processing, sticky forms, file uploads, document expiration, and authentication are covered. It ends with an excellent discussion of maintaining state from page to page and visit to visit, covering cookies and PHP's (very cool) session support.

The security chapter covers standard things you want to keep in mind when creating dynamic HTML. No surprises here, but it is always good to be reminded. The application techniques chapter starts with a collection of best-practices, tips, and tricks to make your development process easier and better. It concludes with sections about error handling and performance tuning. As with the security chapter, there is nothing here a good programmer doesn't already know, but you can never hear it too many times.

I think this is a great book for programmers who want to start developing dynamic web sites with PHP. It gives a detailed overview of PHP, lots of valuable tips, and a good sense of PHP's strengths.

As someone who has written a lot of code, but only a little CGI, I really liked the chapters that discussed application development techniques specific to the web. Along those lines, not much time is spent on standard coding techniques, so if you want to use PHP but have never written any serious code, you may want to look elsewhere for an introduction. For the rest of you, just think, you may never have to use CGI.pm again.

The index seems adequate, although I must admit I did not use it much on the first read-through. The book is so well organized that, when reading it, you do not have to flip around much. Perhaps someone who has used this book as a reference can comment further on the quality of the index.

Contents are available on O'Reilly's page Links

See Rasmus's page for links to where you can buy the book (maybe he gets a kickback for the link). Of course, you could always go to a local bookstore and purchase it.

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

4 of 219 comments (clear)

  1. ASP suxors by The+Ape+With+No+Name · · Score: 1, Flamebait

    e-Commerce sites use ASP because they are developed by DBAs who are usually not programmers, but drag-and-droppers who understand control structures. It has nothing to do with the "intensity" of the work. Perl and Oracle are just as fast if you know what you are doing. Spank you very much, Trolly Trollerton.

    --
    Comparing it to Windows will be a moot point, since El Dorado is going to have a 40% larger code base than XP.
  2. Re:Alternate Resource by jallen02 · · Score: 0, Flamebait

    I am biased as I have written a book on PHP but...

    The online reference is just that, a reference. If you want an overview or practical examples with even moderate complexity the online reference begins to show where it is weak. It is almost standard for programming books that have an audience of beginner to intermediate programmers to have a beggining section on language syntax.

    After language syntax you move on to the harder topics.

    Anyhow, books are good for practical problem solving when the authors of the book avoid making redundant reference material the bulk of the content in a book. And if an author *does* do that the book tends to be much more useful than people imagine.

    Now then, can someone please tell me why every O'Reilly book is hailed as the best book on a given topic? It is really sad to see people always hype O'Reilly books to the point where objectively comparing other books in the field is impossible. O'Reilly *DOES* write some undernourished books, and they also don't always write the *BEST* book. That is all I have to say about that.

    Jeremy

  3. Re:Remote Object Calls. by SirSlud · · Score: 1, Flamebait

    We are a business. We serve Fortune 500 clients. We don't need no stinkin RCs, and thank the fucking lord we dont have to write the front-end of our app in JSP, Perl or C ... yay for PHP. Talk about a time/money saver.

    Your attitude is that of the 'cookie-cutter' CS grad. What you might learn in the future is that you shouldn't throw out the entire code base with the missing feature.

    --
    "Old man yells at systemd"
  4. There is no programming in PHP by axxackall · · Score: 0, Flamebait
    What kind of programming are you talking about? There is no such thing as a "programming" on a file format, which is not really a programming *language*. I might be poisoned by other programming languages, but I did try PHP for mid-size projects. And I don't call that effort as a programming. Perl (another obscurity lang) may - they have nothing better to compare with. But after years on Java, Python, Lisp and C++ I use the word "hacking" about the process of writing the PHP code.

    Hacking is the coding without thinking, without preliminary and formal analysis and design - what is the essence of real programming as a part of software engineering.

    There is no such thing as Design or Analysis to apply or PHP hacking. You write the code and see what's happened. But even that part is terrible as there is no good debugging and logging.

    Aspects (logical and UI) are not separated. It's same bad as ASP. And thus it has no future. It is as dead as ASP.

    Unfortunately, there was a strong point about the budget in start-up web companies. They hired un-educated "programmers" who use such a "programming language". It was ok for small projects, such as few web pages. But the real project is far way from being a set of linked web-pages. That requires a real and general programming language, not just a scripting inside HTML tags.

    No language - no programming. It is just a file format and therefore the PHP coding is just a hacking.

    --

    Less is more !