Follow Slashdot stories on Twitter

 



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

Programming PHP 228

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.

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

Programming PHP

Comments Filter:
  • by alnapp ( 321260 ) on Thursday September 12, 2002 @11:09AM (#4244763) Homepage
    No contradiction:

    You're an accomplished programmer but a PHP newbie then buy it.
    Your a newbie to programming then there's prolly a "for dummies" out there.

    Or, HIBT HIL and I'm having a nice day thank-you
  • by ctembreull ( 120894 ) on Thursday September 12, 2002 @11:15AM (#4244810)
    This is true... and not true at the same time. I work for a large company (name withheld). We use it here, and quite successfully. I also worked for a large company prior to this one. We used it there, as well.

    Lacking x feature or n widget doesn't necessarily stop businesses from using something, it just keeps them from using it for everything.

  • by killmenow ( 184444 ) on Thursday September 12, 2002 @11:56AM (#4245050)
    When I read your post, I thought of C++...

    A complete hack of a language. It's cool and all, but by making the old calls available, you allow users to still shoot themselves in the foot.

    At any rate, I always thought the point of a good programming language was to give me a good gun for hitting the type of target I'm after...but if I want to aim it at my foot, well, c'est la vie.
  • by Jobe_br ( 27348 ) <bdruth@gmailCOUGAR.com minus cat> on Thursday September 12, 2002 @12:24PM (#4245287)
    PHP is certainly not intended to be a middle-tier language, which is where remote calls would be most useful. That said, there's no reason some time couldn't be invested to find a work-around. Many C libraries can be wrapped with ease and accessed from PHP. Find a C library that allows for RPC (or remote object calls) and wrap it. Nevermind the ease with which Java classes integrate with PHP (its dead-simple) and Java's well known RMI (et al) support, you should be set.

    As other posters have mentioned, PHP doesn't need to natively do *everything* - that just serves to bloat. But, it ought not *prevent* anything (which is Perl's mantra, too). For the most part, this is the case, especially with the Java integration. Between PHP and Java, if you find something that you can't do, I'd be most surprised. And if so - just use Perl :)

    Cheers.
  • by killmenow ( 184444 ) on Thursday September 12, 2002 @12:25PM (#4245295)
    Its pointless for all but smaller sites, businesses can't use it without remote calls.
    I am trying not to be offended by your arrogance. I take it you think smaller sites are all just hobbyists or bloggers?

    I think your view is unbelievably pretentious considering that according to this [sbs.gov.uk] the U.K. had 3.7 million active businesses in 2001 and of them 99.1% were small businesses (under 50 employees).

    And, according to this [sba.gov] in the USA:
    • there are approximately 25 million small businesses in the U.S.
    • new business formation reached another record level in 1998
    • there were 898,000 new employer businesses in 1998 -- the highest ever and a 1.5 percent increase over the record of 889,000 new businesses in 1997
    • In 1998, seven of the 10 industries which added the most new jobs were in sectors dominated by small businesses (U.S. Department of Labor, U.S. Department of Commerce)
    • small businesses hire a larger proportion of employees who are younger workers, older workers, women or workers who prefer to work part-time
    • small businesses provide 67 percent of workers with their first jobs and initial on the job training in basic skills
    • small business bankruptcies are the lowest in 19 years

    Also, small businesses...

    • provide approximately 75 percent of the net new jobs added to the economy.
    • represent 99.7 percent of all employers.
    • employ 53 percent of the private work force.
    • provide 47 percent of all sales in the country.
    • provide 55 percent of innovations.
    • account for 35 percent of federal contract dollars.
    • account for 38 percent of jobs in high technology sectors.
    • account for 51 percent of private sector output.
    • represent 96 percent of all U.S. exporters.
    Gee, now I see your point. You're right: PHP is useless to just about everybody out there.
  • by Tablizer ( 95088 ) on Thursday September 12, 2002 @12:38PM (#4245391) Journal

    It seems to me that web language books need to be split into two groups:

    1. Web techniques

    2. The language

    Once one is familiar with typical web techniques and issues (form handling, state management issues, etc.), then many of the books seem redundant WRT web techniques.

    The problem is that "Web Programming Techniques" would probably have to choose an actual language for its examples, so they figure they might as well put them together.

    Perhaps Oreilly should split web language books into a language details book, and a "Web Techniques using X" series for those new to web issues (where X is a specific language). They could use pretty much the same material, but simply swap the language for that one.

    Web programming issues are pretty much the same in ASP, PHP, ColdFusion, etc. If I need to pick up yet another web language, such as JSP, I don't want to waste book-size and eye-space on the same web issues, I want to get right into the specifics and uniqueness (gotcha's) of the particular language.
  • Re:PHP reference (Score:3, Insightful)

    by reallocate ( 142797 ) on Thursday September 12, 2002 @02:24PM (#4246177)
    Bookstores are floating in computer books and many of them are little more than repackaged manuals. The authors add little, if anything, to these books. But, if an author brings experience, perspective, insight and skill to a book, then you'll learn something that's not available elsewhere. If you confine your reading to readme files and syntax manuals, you're limiting yourself.
  • Re:I saw this (Score:5, Insightful)

    by Rasmus ( 740 ) on Thursday September 12, 2002 @06:48PM (#4247959) Homepage
    Do you really believe that this was my plan? And even if it was, do you think I succeeded? The online docs are freakin' excellent if you ask me, and I will be the first to tell you that you do not need to buy the dead-tree O'Reilly book in order to use PHP. Some people just like having a book they can sit and read on a train, plane or a beach without squinting at a screen. Plus, you don't look like such a geek if you are lying on a beach with a book vs. lying there with a laptop.

    You probably also don't know the financials of publishing all that well. Trust me, this book is not going to make me rich even if every PHP user out there bought a copy. Keep in mind that my name is not the only one on this book. Hopefully it will cover various PHP-related travel expenses I always end up with going to conferences and user group meetings and also help with a computer upgrade and if I am lucky a fancy new laptop.

Intel CPUs are not defective, they just act that way. -- Henry Spencer

Working...